Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not promote constants that contain unpromotable code #51570

Closed
wants to merge 1 commit into from

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jun 15, 2018

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 15, 2018
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 15, 2018

@bors try

@bors
Copy link
Contributor

bors commented Jun 15, 2018

⌛ Trying commit db8dea2 with merge 55b235a...

bors added a commit that referenced this pull request Jun 15, 2018
Do not promote constants that contain unpromotable code

r? @eddyb

cc @nikomatsakis

I'll add more tests, just getting this out for a crater run
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/ce/50/6789babdceaae0e7d4c43b66a76052c5f8b8ef2416075f5604c8961adb94/awscli-1.15.39-py2.py3-none-any.whl (1.3MB)
    0% |▎                               | 10kB 21.0MB/s eta 0:00:01
    1% |▌                               | 20kB 2.0MB/s eta 0:00:01
    2% |▉                               | 30kB 2.3MB/s eta 0:00:01
    3% |█                               | 40kB 2.0MB/s eta 0:00:01
---
    100% |████████████████████████████████| 61kB 7.0MB/s 
Collecting botocore==1.10.39 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/ac/35/bf811140cc44b45ebe1601b83151e86b57bfed31b06c451a0f87383f9eed/botocore-1.10.39-py2.py3-none-any.whl (4.3MB)
    0% |                                | 10kB 29.3MB/s eta 0:00:01
    0% |▏                               | 20kB 27.5MB/s eta 0:00:01
    0% |▎                               | 30kB 31.2MB/s eta 0:00:01
    0% |▎                               | 40kB 23.3MB/s eta 0:00:01
---
[00:20:54]    Compiling rustc_lsan v0.0.0 (file:///checkout/src/librustc_lsan)
[00:20:56]    Compiling rustc_tsan v0.0.0 (file:///checkout/src/librustc_tsan)
[00:20:56]    Compiling rustc_asan v0.0.0 (file:///checkout/src/librustc_asan)
[00:20:57]    Compiling rustc_msan v0.0.0 (file:///checkout/src/librustc_msan)
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 3781 |         ASCII_UPPERCASE_MAP[*self as usize]
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 3803 |         ASCII_LOWERCASE_MAP[*self as usize]
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 3908 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 3909 | |             L | Lx | U | Ux => true,
[00:21:22] 3910 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 3909 |             L | Lx | U | Ux => true,
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 3946 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 3947 | |             U | Ux => true,
[00:21:22] 3948 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 3947 |             U | Ux => true,
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 3984 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 3985 | |             L | Lx => true,
[00:21:22] 3986 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 3985 |             L | Lx => true,
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4025 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 4026 | |             D | L | Lx | U | Ux => true,
[00:21:22] 4027 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4026 |             D | L | Lx | U | Ux => true,
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4063 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 4064 | |             D => true,
[00:21:22] 4065 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22] 4064 |             D => true,
[00:21:22]      |             ^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4104 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 4105 | |             D | Lx | Ux => true,
[00:21:22] 4106 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4105 |             D | Lx | Ux => true,
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4146 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 4147 | |             P => true,
[00:21:22] 4148 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22] 4147 |             P => true,
[00:21:22]      |             ^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4184 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 4185 | |             Ux | U | Lx | L | D | P => true,
[00:21:22] 4186 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4185 |             Ux | U | Lx | L | D | P => true,
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4239 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 4240 | |             Cw | W => true,
[00:21:22] 4241 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4240 |             Cw | W => true,
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4279 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:21:22] 4280 | |             C | Cw => true,
[00:21:22] 4281 | |             _ => false
[00:21:22]      | |_________^
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]      |
[00:21:22]      |
[00:21:22] 4280 |             C | Cw => true,
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]    |
[00:21:22]    |
[00:21:22] 45 |     if n &   7 != 0 { x.mul_small(POW10[n & 7]); }
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]    |
[00:21:22]    |
[00:21:22] 46 |     if n &   8 != 0 { x.mul_small(POW10[8]); }
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]    |
[00:21:22]    |
[00:21:22] 58 |         x.div_rem_small(POW10[largest]);
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]    |
[00:21:22]    |
[00:21:22] 61 |     x.div_rem_small(TWOPOW10[n]);
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]     |
[00:21:22]     |
[00:21:22] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]     |
[00:21:22]     |
[00:21:22] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:21:22] 
[00:21:22] 
[00:21:22] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:22]     |
[00:21:22]     |
[00:21:22] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:21:22] 
[00:21:22] 
[00:21:23] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:23]     --> libcore/str/mod.rs:1462:21
[00:21:23]      |
[00:21:23] 1462 |             let w = UTF8_CHAR_WIDTH[first as usize];
[00:21:23] 
[00:21:23] 
[00:21:23] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:21:23]     --> libcore/str/mod.rs:1573:12
[00:21:23]      |
[00:21:23] 1573 |     return UTF8_CHAR_WIDTH[b as usize] as usize;
[00:21:23] 
obj/build/bootstrap/debug/bootstrap build
[00:21:28] Build completed unsuccessfully in 0:16:43
[00:21:28] Build completed unsuccessfully in 0:16:43
[00:21:28] make: *** [all] Error 1
[00:21:28] Makefile:28: recipe for target 'all' failed

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Jun 15, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 15, 2018
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-linux of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_fold:end:services

travis_fold:start:git.checkout
travis_time:start:11e909f6
$ git clone --depth=2 --branch=try https://github.com/rust-lang/rust.git rust-lang/rust
---
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/ce/50/6789babdceaae0e7d4c43b66a76052c5f8b8ef2416075f5604c8961adb94/awscli-1.15.39-py2.py3-none-any.whl (1.3MB)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
---
  Downloading https://files.pythonhosted.org/packages/d7/14/2a0004d487464d120c9fb85313a75cd3d71a7506955be458eebfe19a6b1d/s3transfer-0.1.13-py2.py3-none-any.whl (59kB)
Collecting botocore==1.10.39 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/ac/35/bf811140cc44b45ebe1601b83151e86b57bfed31b06c451a0f87383f9eed/botocore-1.10.39-py2.py3-none-any.whl (4.3MB)
Collecting docutils>=0.10 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/50/09/c53398e0005b11f7ffb27b7aa720c617aba53be4fb4f4f3f06b9b5c60f28/docutils-0.14-py2-none-any.whl (543kB)
---
[00:32:02] warning: ../libcompiler_builtins/compiler-rt/lib/profile/InstrProfilingValue.c:109:48: warning: unused parameter 'Value' [-Wunused-parameter]
[00:32:02] warning:                                       uint64_t Value) {
[00:32:02] warning:                                                ^
[00:32:02] warning: 3 warnings generated.
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3781 |         ASCII_UPPERCASE_MAP[*self as usize]
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3803 |         ASCII_LOWERCASE_MAP[*self as usize]
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3908 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 3909 | |             L | Lx | U | Ux => true,
[00:32:30] 3910 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3909 |             L | Lx | U | Ux => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3946 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 3947 | |             U | Ux => true,
[00:32:30] 3948 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3947 |             U | Ux => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3984 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 3985 | |             L | Lx => true,
[00:32:30] 3986 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3985 |             L | Lx => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4025 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4026 | |             D | L | Lx | U | Ux => true,
[00:32:30] 4027 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4026 |             D | L | Lx | U | Ux => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4063 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4064 | |             D => true,
[00:32:30] 4065 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30] 4064 |             D => true,
[00:32:30]      |             ^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4104 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4105 | |             D | Lx | Ux => true,
[00:32:30] 4106 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4105 |             D | Lx | Ux => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4146 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4147 | |             P => true,
[00:32:30] 4148 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30] 4147 |             P => true,
[00:32:30]      |             ^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4184 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4185 | |             Ux | U | Lx | L | D | P => true,
[00:32:30] 4186 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4185 |             Ux | U | Lx | L | D | P => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4239 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4240 | |             Cw | W => true,
[00:32:30] 4241 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4240 |             Cw | W => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4279 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4280 | |             C | Cw => true,
[00:32:30] 4281 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4280 |             C | Cw => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]    |
[00:32:30]    |
[00:32:30] 45 |     if n &   7 != 0 { x.mul_small(POW10[n & 7]); }
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]    |
[00:32:30]    |
[00:32:30] 46 |     if n &   8 != 0 { x.mul_small(POW10[8]); }
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]    |
[00:32:30]    |
[00:32:30] 58 |         x.div_rem_small(POW10[largest]);
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]    |
[00:32:30]    |
[00:32:30] 61 |     x.div_rem_small(TWOPOW10[n]);
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]     |
[00:32:30]     |
[00:32:30] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]     |
[00:32:30]     |
[00:32:30] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]     |
[00:32:30]     |
[00:32:30] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:32:30] 
[00:32:30] 
[00:32:32] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:32]     --> libcore/str/mod.rs:1462:21
[00:32:32]      |
[00:32:32] 1462 |             let w = UTF8_CHAR_WIDTH[first as usize];
[00:32:32] 
[00:32:32] 
[00:32:32] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:32]     --> libcore/str/mod.rs:1573:12
[00:32:32]      |
[00:32:32] 1573 |     return UTF8_CHAR_WIDTH[b as usize] as usize;
[00:32:32] 
[00:32:42] error: aborting due to 31 previous errors
[00:32:42] 
[00:32:42] For more information about this error, try `rustc --explain E0494`.
[00:32:42] For more information about this error, try `rustc --explain E0494`.
[00:32:42] error: Could not compile `core`.
[00:32:42] 
[00:32:42] Caused by:
[00:32:42]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name core libcore/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=9cebfd5492943f2f -C extra-filename=-9cebfd5492943f2f --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=clang -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps` (exit code: 101)
[00:32:42] warning: build failed, waiting for other jobs to finish...
[00:33:07] error: build failed
[00:33:07] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace profiler" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:33:07] expected success, got: exit code: 101
[00:33:07] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:33:07] travis_fold:end:stage1-std

[00:33:07] travis_time:end:stage1-std:start=1529037394722906629,finish=1529037480114169387,duration=85391262758

---
travis_time:end:0cd05e0e:start=1529037480955071483,finish=1529037480962571626,duration=7500143
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:24300b46
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
global:
global:
  _ZdaPv;
  _ZdaPvRKSt9nothrow_t;
  _ZdaPvSt11align_val_t;
  _ZdaPvSt11align_val_tRKSt9nothrow_t;
  _ZdaPvj;
  _ZdaPvjSt11align_val_t;
  _ZdlPv;
  _ZdlPvRKSt9nothrow_t;
  _ZdlPvSt11align_val_t;
  _ZdlPvSt11align_val_tRKSt9nothrow_t;
  _ZdlPvj;
  _ZdlPvjSt11align_val_t;
  _Znaj;
  _ZnajRKSt9nothrow_t;
  _ZnajSt11align_val_t;
  _ZnajSt11align_val_tRKSt9nothrow_t;
  _Znwj;
  _ZnwjRKSt9nothrow_t;
  _ZnwjSt11align_val_t;
  _ZnwjSt11align_val_tRKSt9nothrow_t;
  __asan_*;
  __cxa_atexit;
  __cxa_throw;
  __fprintf_chk;
  __getdelim;
  __interceptor___cxa_atexit;
  __interceptor___cxa_throw;
  __interceptor___fprintf_chk;
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:12b69e78
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

1 similar comment
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-linux of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_fold:end:services

travis_fold:start:git.checkout
travis_time:start:11e909f6
$ git clone --depth=2 --branch=try https://github.com/rust-lang/rust.git rust-lang/rust
---
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/ce/50/6789babdceaae0e7d4c43b66a76052c5f8b8ef2416075f5604c8961adb94/awscli-1.15.39-py2.py3-none-any.whl (1.3MB)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
---
  Downloading https://files.pythonhosted.org/packages/d7/14/2a0004d487464d120c9fb85313a75cd3d71a7506955be458eebfe19a6b1d/s3transfer-0.1.13-py2.py3-none-any.whl (59kB)
Collecting botocore==1.10.39 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/ac/35/bf811140cc44b45ebe1601b83151e86b57bfed31b06c451a0f87383f9eed/botocore-1.10.39-py2.py3-none-any.whl (4.3MB)
Collecting docutils>=0.10 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/50/09/c53398e0005b11f7ffb27b7aa720c617aba53be4fb4f4f3f06b9b5c60f28/docutils-0.14-py2-none-any.whl (543kB)
---
[00:32:02] warning: ../libcompiler_builtins/compiler-rt/lib/profile/InstrProfilingValue.c:109:48: warning: unused parameter 'Value' [-Wunused-parameter]
[00:32:02] warning:                                       uint64_t Value) {
[00:32:02] warning:                                                ^
[00:32:02] warning: 3 warnings generated.
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3781 |         ASCII_UPPERCASE_MAP[*self as usize]
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3803 |         ASCII_LOWERCASE_MAP[*self as usize]
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3908 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 3909 | |             L | Lx | U | Ux => true,
[00:32:30] 3910 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3909 |             L | Lx | U | Ux => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3946 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 3947 | |             U | Ux => true,
[00:32:30] 3948 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3947 |             U | Ux => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3984 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 3985 | |             L | Lx => true,
[00:32:30] 3986 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 3985 |             L | Lx => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4025 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4026 | |             D | L | Lx | U | Ux => true,
[00:32:30] 4027 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4026 |             D | L | Lx | U | Ux => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4063 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4064 | |             D => true,
[00:32:30] 4065 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30] 4064 |             D => true,
[00:32:30]      |             ^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4104 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4105 | |             D | Lx | Ux => true,
[00:32:30] 4106 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4105 |             D | Lx | Ux => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4146 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4147 | |             P => true,
[00:32:30] 4148 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30] 4147 |             P => true,
[00:32:30]      |             ^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4184 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4185 | |             Ux | U | Lx | L | D | P => true,
[00:32:30] 4186 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4185 |             Ux | U | Lx | L | D | P => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4239 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4240 | |             Cw | W => true,
[00:32:30] 4241 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4240 |             Cw | W => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4279 | /         match ASCII_CHARACTER_CLASS[*self as usize] {
[00:32:30] 4280 | |             C | Cw => true,
[00:32:30] 4281 | |             _ => false
[00:32:30]      | |_________^
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]      |
[00:32:30]      |
[00:32:30] 4280 |             C | Cw => true,
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]    |
[00:32:30]    |
[00:32:30] 45 |     if n &   7 != 0 { x.mul_small(POW10[n & 7]); }
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]    |
[00:32:30]    |
[00:32:30] 46 |     if n &   8 != 0 { x.mul_small(POW10[8]); }
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]    |
[00:32:30]    |
[00:32:30] 58 |         x.div_rem_small(POW10[largest]);
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]    |
[00:32:30]    |
[00:32:30] 61 |     x.div_rem_small(TWOPOW10[n]);
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]     |
[00:32:30]     |
[00:32:30] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]     |
[00:32:30]     |
[00:32:30] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:32:30] 
[00:32:30] 
[00:32:30] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:30]     |
[00:32:30]     |
[00:32:30] 131 |     let (f, e, k) = CACHED_POW10[idx as usize];
[00:32:30] 
[00:32:30] 
[00:32:32] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:32]     --> libcore/str/mod.rs:1462:21
[00:32:32]      |
[00:32:32] 1462 |             let w = UTF8_CHAR_WIDTH[first as usize];
[00:32:32] 
[00:32:32] 
[00:32:32] error[E0494]: cannot refer to the interior of another static, use a constant instead
[00:32:32]     --> libcore/str/mod.rs:1573:12
[00:32:32]      |
[00:32:32] 1573 |     return UTF8_CHAR_WIDTH[b as usize] as usize;
[00:32:32] 
[00:32:42] error: aborting due to 31 previous errors
[00:32:42] 
[00:32:42] For more information about this error, try `rustc --explain E0494`.
[00:32:42] For more information about this error, try `rustc --explain E0494`.
[00:32:42] error: Could not compile `core`.
[00:32:42] 
[00:32:42] Caused by:
[00:32:42]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name core libcore/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=9cebfd5492943f2f -C extra-filename=-9cebfd5492943f2f --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=clang -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps` (exit code: 101)
[00:32:42] warning: build failed, waiting for other jobs to finish...
[00:33:07] error: build failed
[00:33:07] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind jemalloc backtrace profiler" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "--message-format" "json"
[00:33:07] expected success, got: exit code: 101
[00:33:07] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:33:07] travis_fold:end:stage1-std

[00:33:07] travis_time:end:stage1-std:start=1529037394722906629,finish=1529037480114169387,duration=85391262758

---
travis_time:end:0cd05e0e:start=1529037480955071483,finish=1529037480962571626,duration=7500143
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:24300b46
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
global:
global:
  _ZdaPv;
  _ZdaPvRKSt9nothrow_t;
  _ZdaPvSt11align_val_t;
  _ZdaPvSt11align_val_tRKSt9nothrow_t;
  _ZdaPvj;
  _ZdaPvjSt11align_val_t;
  _ZdlPv;
  _ZdlPvRKSt9nothrow_t;
  _ZdlPvSt11align_val_t;
  _ZdlPvSt11align_val_tRKSt9nothrow_t;
  _ZdlPvj;
  _ZdlPvjSt11align_val_t;
  _Znaj;
  _ZnajRKSt9nothrow_t;
  _ZnajSt11align_val_t;
  _ZnajSt11align_val_tRKSt9nothrow_t;
  _Znwj;
  _ZnwjRKSt9nothrow_t;
  _ZnwjSt11align_val_t;
  _ZnwjSt11align_val_tRKSt9nothrow_t;
  __asan_*;
  __cxa_atexit;
  __cxa_throw;
  __fprintf_chk;
  __getdelim;
  __interceptor___cxa_atexit;
  __interceptor___cxa_throw;
  __interceptor___fprintf_chk;
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:12b69e78
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@oli-obk oli-obk force-pushed the demotion branch 2 times, most recently from 378ef7d to e76172c Compare June 15, 2018 17:25
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 17, 2018

Supersedes #51500

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

[00:04:49] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:50] tidy error: /checkout/src/librustc_metadata/encoder.rs:884: line longer than 100 chars
[00:04:50] tidy error: /checkout/src/librustc_mir/transform/qualify_consts.rs: missing trailing newline
[00:04:51] some tidy checks failed
[00:04:51] 
[00:04:51] 
[00:04:51] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:51] 
[00:04:51] 
[00:04:51] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:51] Build completed unsuccessfully in 0:01:54
[00:04:51] Build completed unsuccessfully in 0:01:54
[00:04:51] make: *** [tidy] Error 1
[00:04:51] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:04dec794
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:002e7aa8:start=1529258009527399579,finish=1529258009536769978,duration=9370399
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:246c6d57
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:2fe1f5da
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:22:47]    Compiling chalk-engine v0.6.0
[00:22:49]    Compiling parking_lot_core v0.2.14
[00:22:49]    Compiling tempdir v0.3.7
[00:22:49]    Compiling env_logger v0.5.8
[00:22:49] error[E0597]: borrowed value does not live long enough
[00:22:49]   --> /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/parking_lot_core-0.2.14/src/word_lock.rs:66:41
[00:22:49]    |
[00:22:49] 66 |         if let Some(tls) = try_get_tls(&THREAD_DATA) {
[00:22:49]    |                                         ^^^^^^^^^^^ temporary value does not live long enough
[00:22:49] 69 |     }
[00:22:49] 69 |     }
[00:22:49]    |     - temporary value only lives until here
[00:22:49]    |
[00:22:49]    = note: borrowed value must be valid for the static lifetime...
[00:22:49] 
[00:22:49] error[E0597]: borrowed value does not live long enough
[00:22:49]     |
[00:22:49]     |
[00:22:49] 178 |     if let Some(tls) = try_get_tls(&THREAD_DATA) {
[00:22:49]     |                                     ^^^^^^^^^^^ temporary value does not live long enough
[00:22:49] 179 |         return &*tls;
[00:22:49] 180 |     }
[00:22:49]     |     - temporary value only lives until here
[00:22:49]     |
[00:22:49]     = note: borrowed value must be valid for the static lifetime...
[00:22:49]     = note: consider using a `let` binding to increase its lifetime
[00:22:49] error: aborting due to 2 previous errors
[00:22:49] 
[00:22:49] For more information about this error, try `rustc --explain E0597`.
[00:22:49] error: Could not compile `parking_lot_core`.
[00:22:49] error: Could not compile `parking_lot_core`.
[00:22:49] 
[00:22:49] Caused by:
[00:22:49]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name parking_lot_core /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/parking_lot_core-0.2.14/src/lib.rs --color always --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 --cfg feature="nightly" -C metadata=688af4b61ce9ef3e -C extra-filename=-688af4b61ce9ef3e --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern rand=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librand-38bd483223ea337c.rlib --extern smallvec=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsmallvec-569efe1a6d869259.rlib --extern libc=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblibc-a3ea060267c173a1.rlib --cap-lints allow` (exit code: 101)
[00:22:52] error: build failed
[00:22:52] error: build failed
[00:22:52] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:22:52] expected success, got: exit code: 101
[00:22:52] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:22:52] travis_fold:end:stage1-rustc

[00:22:52] travis_time:end:stage1-rustc:start=1529316064385206424,finish=1529316089308340723,duration=24923134299


[00:22:52] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:22:52] Build completed unsuccessfully in 0:17:58
[00:22:52] make: *** [all] Error 1
[00:22:52] Makefile:28: recipe for target 'all' failed

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 18, 2018

@bors try

@bors
Copy link
Contributor

bors commented Jun 18, 2018

⌛ Trying commit 1030037 with merge ba92154...

bors added a commit that referenced this pull request Jun 18, 2018
Do not promote constants that contain unpromotable code

r? @eddyb

cc @nikomatsakis

I'll add more tests, just getting this out for a crater run
@bors
Copy link
Contributor

bors commented Jun 18, 2018

☀️ Test successful - status-travis
State: approved= try=True

@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 18, 2018

@rust-lang/infra Can you start a check-only crater run?

@kennytm
Copy link
Member

kennytm commented Jun 18, 2018

cc @pietroalbini

@kennytm kennytm added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 18, 2018
@pietroalbini
Copy link
Member

Check-only Crater run started on crater-1. Should finish in ~2 days.

@pietroalbini
Copy link
Member

Hi @oli-obk (crater requester), @eddyb (PR reviewer)! Crater results are at: http://cargobomb-reports.s3.amazonaws.com/pr-51570/index.html. 'Blacklisted' crates (spurious failures etc) can be found here. If you see any spurious failures not on the list, please make a PR against that file.

(interested observers: Crater is a tool for testing the impact of changes on the crates.io ecosystem. You can find out more at the repo if you're curious)

@pietroalbini
Copy link
Member

Out of the crates previously building, 3 crates regressed:

No spurious failure.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 26, 2018

I opened a PR to type-info to proactively have them work around the breakage that this PR would introduce if merged.



fn main() {
let x: &'static usize = &FOO; //~ ERROR does not live long enough
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we discussed this at the compiler meeting, and constants should be promoted irrelevant of the constant's body in case the constant's value is never inspected.

Examples like the one below (&(FOO % 42)) will still not get promoted.

Examples like &SomeStruct { a: FOO } will get promoted, because the value is only copied, not inspected.

@bors
Copy link
Contributor

bors commented Jun 29, 2018

☔ The latest upstream changes (presumably #51884) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Jul 2, 2018

☔ The latest upstream changes (presumably #51110) made this pull request unmergeable. Please resolve the merge conflicts.

@pietroalbini
Copy link
Member

Ping from triage @oli-obk! There are conflicts that needs to be solved.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jul 13, 2018

blocked on #52318

@oli-obk oli-obk added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 13, 2018
@oli-obk oli-obk added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Jul 15, 2018
@oli-obk
Copy link
Contributor Author

oli-obk commented Jul 15, 2018

ok, this is ready for the next review round

@bors
Copy link
Contributor

bors commented Jul 16, 2018

☔ The latest upstream changes (presumably #52264) made this pull request unmergeable. Please resolve the merge conflicts.

@oli-obk oli-obk force-pushed the demotion branch 2 times, most recently from 571868e to b7915b7 Compare July 17, 2018 09:39
@RalfJung
Copy link
Member

I am not sure what exactly the promotion rules are that are implemented here, but I just made a proposal at https://www.ralfj.de/blog/2018/07/19/const.html and would be curious for your feedback :)

@bors
Copy link
Contributor

bors commented Jul 20, 2018

☔ The latest upstream changes (presumably #52476) made this pull request unmergeable. Please resolve the merge conflicts.

@TimNN
Copy link
Contributor

TimNN commented Jul 24, 2018

Ping from triage, @eddyb: The PR author has requested another review from you.

@RalfJung
Copy link
Member

AFAIK @oli-obk decided to do this somewhat differently, based on various discussions after my blog post.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:51:12] ..........................................................................i.........................
[00:51:21] .........................................................................i..........................
[00:51:39] ....................................................................................................
[00:51:48] ....................................................................................................
[00:52:04] ...........................................ii...................F...................................
[00:52:46] ....................................................................................................
[00:52:56] ....................................................................................................
[00:53:04] ....................................................................................................
[00:53:15] ....................................................................................................
[00:53:15] ....................................................................................................
[00:53:22] .................................................
[00:53:22] failures:
[00:53:22] 
[00:53:22] ---- [run-pass] run-pass/rvalue-static-promotion.rs stdout ----
[00:53:22] 
[00:53:22] error: compilation failed!
[00:53:22] status: exit code: 1
[00:53:22] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/rvalue-static-promotion.rs" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/rvalue-static-promotion/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/rvalue-static-promotion/auxiliary"
[00:53:22] ------------------------------------------
[00:53:22] 
[00:53:22] ------------------------------------------
[00:53:22] stderr:
[00:53:22] stderr:
[00:53:22] ------------------------------------------
[00:53:22] error[E0597]: borrowed value does not live long enough
[00:53:22]    |
[00:53:22]    |
[00:53:22] 25 |     let _: &'static Option<Cell<String>> = &NONE_CELL_STRING;
[00:53:22]    |                                             ^^^^^^^^^^^^^^^^ temporary value does not live long enough
[00:53:22] 26 |     let _: &'static Option<Box<()>> = &Foo::FOO;
[00:53:22] 27 | }
[00:53:22]    | - temporary value only lives until here
[00:53:22]    |
[00:53:22]    = note: borrowed value must be valid for the static lifetime...
[00:53:22] 
[00:53:22] error[E0597]: borrowed value does not live long enough
[00:53:22]    |
[00:53:22]    |
[00:53:22] 26 |     let _: &'static Option<Box<()>> = &Foo::FOO;
[00:53:22]    |                                        ^^^^^^^^ temporary value does not live long enough
[00:53:22] 27 | }
[00:53:22]    | - temporary value only lives until here
[00:53:22]    |
[00:53:22]    = note: borrowed value must be valid for the static lifetime...
[00:53:22] error: aborting due to 2 previous errors
[00:53:22] 
[00:53:22] For more information about this error, try `rustc --explain E0597`.
[00:53:22] 

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@pietroalbini
Copy link
Member

Ping from triage! What's the status of this?

@oli-obk
Copy link
Contributor Author

oli-obk commented Jul 31, 2018

I don't have time for this right now and it needs major changes

@oli-obk oli-obk closed this Jul 31, 2018
@oli-obk oli-obk deleted the demotion branch June 15, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault or wrong values from const FOO: u32 = 0 - 1; println!("{}", FOO);
8 participants