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

Add feature gate for mut refs in const fn #66606

Merged
merged 15 commits into from Dec 7, 2019

Conversation

@christianpoveda
Copy link
Contributor

christianpoveda commented Nov 21, 2019

r? @oli-obk

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Nov 21, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-21T13:47:00.8602089Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-21T13:47:01.4910891Z ##[command]git config gc.auto 0
2019-11-21T13:47:01.4913438Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-21T13:47:01.4915253Z ##[command]git config --get-all http.proxy
2019-11-21T13:47:01.4918055Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66606/merge:refs/remotes/pull/66606/merge
---
2019-11-21T13:53:26.3802655Z     Finished release [optimized] target(s) in 1m 31s
2019-11-21T13:53:26.3912964Z tidy check
2019-11-21T13:53:27.7774355Z * 588 error codes
2019-11-21T13:53:27.7774732Z * highest error code: E0744
2019-11-21T13:53:27.8211661Z tidy error: /checkout/src/libsyntax/feature_gate/active.rs:533: no tracking issue for feature const_fn_mut_refs
2019-11-21T13:53:29.1344892Z Found 441 error codes
2019-11-21T13:53:29.1345016Z Found 0 error codes with no tests
2019-11-21T13:53:29.1345061Z Done!
2019-11-21T13:53:29.1345152Z some tidy checks failed
2019-11-21T13:53:29.1345152Z some tidy checks failed
2019-11-21T13:53:29.1345183Z 
2019-11-21T13:53:29.1345208Z 
2019-11-21T13:53:29.1346140Z 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"
2019-11-21T13:53:29.1346269Z 
2019-11-21T13:53:29.1346294Z 
2019-11-21T13:53:29.1351017Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-11-21T13:53:29.1351124Z Build completed unsuccessfully in 0:01:35
2019-11-21T13:53:29.1351124Z Build completed unsuccessfully in 0:01:35
2019-11-21T13:53:29.1402702Z == clock drift check ==
2019-11-21T13:53:29.1420604Z   local time: Thu Nov 21 13:53:29 UTC 2019
2019-11-21T13:53:29.4306804Z   network time: Thu, 21 Nov 2019 13:53:29 GMT
2019-11-21T13:53:29.4308776Z == end clock drift check ==
2019-11-21T13:53:30.7061527Z 
2019-11-21T13:53:30.7179681Z ##[error]Bash exited with code '1'.
2019-11-21T13:53:30.7220222Z ##[section]Starting: Checkout
2019-11-21T13:53:30.7222597Z ==============================================================================
2019-11-21T13:53:30.7222675Z Task         : Get sources
2019-11-21T13:53:30.7222728Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Nov 21, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-21T17:40:55.2337465Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-21T17:40:55.9427906Z ##[command]git config gc.auto 0
2019-11-21T17:40:55.9432226Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-21T17:40:55.9438861Z ##[command]git config --get-all http.proxy
2019-11-21T17:40:55.9454950Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66606/merge:refs/remotes/pull/66606/merge
---
2019-11-21T17:47:08.8251768Z     Finished release [optimized] target(s) in 1m 28s
2019-11-21T17:47:08.8373972Z tidy check
2019-11-21T17:47:10.2006786Z * 588 error codes
2019-11-21T17:47:10.2006905Z * highest error code: E0744
2019-11-21T17:47:10.5919965Z Expected a gate test for the feature 'const_mut_refs'.
2019-11-21T17:47:10.5920862Z Hint: create a failing test file named 'feature-gate-const_mut_refs.rs'
2019-11-21T17:47:10.5921620Z       in the 'ui' test suite, with its failures due to
2019-11-21T17:47:10.5921823Z       missing usage of `#![feature(const_mut_refs)]`.
2019-11-21T17:47:10.5924015Z Hint: If you already have such a test and don't want to rename it,
2019-11-21T17:47:10.5925521Z       you can also add a // gate-test-const_mut_refs line to the test file.
2019-11-21T17:47:10.5926332Z tidy error: Found 1 features without a gate test.
2019-11-21T17:47:11.5407181Z Found 441 error codes
2019-11-21T17:47:11.5408344Z Found 0 error codes with no tests
2019-11-21T17:47:11.5408940Z Done!
2019-11-21T17:47:11.5409110Z some tidy checks failed
2019-11-21T17:47:11.5409110Z some tidy checks failed
2019-11-21T17:47:11.5409168Z 
2019-11-21T17:47:11.5409192Z 
2019-11-21T17:47:11.5410089Z 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"
2019-11-21T17:47:11.5410212Z 
2019-11-21T17:47:11.5410236Z 
2019-11-21T17:47:11.5421984Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-11-21T17:47:11.5422084Z Build completed unsuccessfully in 0:01:32
2019-11-21T17:47:11.5422084Z Build completed unsuccessfully in 0:01:32
2019-11-21T17:47:11.5477074Z == clock drift check ==
2019-11-21T17:47:11.5486241Z   local time: Thu Nov 21 17:47:11 UTC 2019
2019-11-21T17:47:12.5450796Z   network time: Thu, 21 Nov 2019 17:47:11 GMT
2019-11-21T17:47:12.5451905Z == end clock drift check ==
2019-11-21T17:47:13.1668789Z 
2019-11-21T17:47:13.1787916Z ##[error]Bash exited with code '1'.
2019-11-21T17:47:13.1823540Z ##[section]Starting: Checkout
2019-11-21T17:47:13.1825969Z ==============================================================================
2019-11-21T17:47:13.1826053Z Task         : Get sources
2019-11-21T17:47:13.1826107Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Nov 21, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-21T20:31:00.1414672Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-21T20:31:00.1670439Z ##[command]git config gc.auto 0
2019-11-21T20:31:00.1755442Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-21T20:31:00.1800391Z ##[command]git config --get-all http.proxy
2019-11-21T20:31:00.1957713Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66606/merge:refs/remotes/pull/66606/merge
---
2019-11-21T21:32:10.6115642Z .............i...................................................................................... 4800/9264
2019-11-21T21:32:20.2580471Z .................................................................................................... 4900/9264
2019-11-21T21:32:25.2790664Z .................................................................................................... 5000/9264
2019-11-21T21:32:34.9842080Z .................................................................................................... 5100/9264
2019-11-21T21:32:40.1566048Z ...ii.ii...........i................................................................................ 5200/9264
2019-11-21T21:32:50.4744986Z .................................................................................................... 5400/9264
2019-11-21T21:33:00.9503882Z .....................................................................................i.............. 5500/9264
2019-11-21T21:33:09.2622942Z .................................................................................................... 5600/9264
2019-11-21T21:33:15.2425179Z .................................................................................................... 5700/9264
2019-11-21T21:33:15.2425179Z .................................................................................................... 5700/9264
2019-11-21T21:33:25.4423077Z .......................................................................ii...i..ii...........i....... 5800/9264
2019-11-21T21:33:47.4375728Z .................................................................................................... 6000/9264
2019-11-21T21:33:53.8943331Z .................................................................................................... 6100/9264
2019-11-21T21:33:53.8943331Z .................................................................................................... 6100/9264
2019-11-21T21:33:58.2126672Z ..............................................................................................i..ii. 6200/9264
2019-11-21T21:34:20.6689717Z .................................................................................................... 6400/9264
2019-11-21T21:34:29.9314235Z ..............................................................i..................................... 6500/9264
2019-11-21T21:34:32.2442444Z .................................................................................................... 6600/9264
2019-11-21T21:34:34.6544727Z ...................................................i................................................ 6700/9264
---
2019-11-21T21:39:10.9961469Z ---- [ui] ui/consts/miri_unleashed/mutable_const.rs stdout ----
2019-11-21T21:39:10.9961549Z diff of stderr:
2019-11-21T21:39:10.9961578Z 
2019-11-21T21:39:10.9961788Z - warning: skipping const checks
2019-11-21T21:39:10.9961840Z + error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-21T21:39:10.9962106Z 3    |
2019-11-21T21:39:10.9962106Z 3    |
2019-11-21T21:39:10.9962149Z 4 LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
2019-11-21T21:39:10.9962196Z 
2019-11-21T21:39:10.9962233Z 10 LL |         *MUTABLE_BEHIND_RAW = 99
2019-11-21T21:39:10.9962495Z 12 
2019-11-21T21:39:10.9962783Z - error: any use of this value will cause an error
2019-11-21T21:39:10.9962969Z -   --> $DIR/mutable_const.rs:15:9
2019-11-21T21:39:10.9963125Z -    |
2019-11-21T21:39:10.9963125Z -    |
2019-11-21T21:39:10.9963339Z - LL | / const MUTATING_BEHIND_RAW: () = {
2019-11-21T21:39:10.9963591Z - LL | |     // Test that `MUTABLE_BEHIND_RAW` is actually immutable, by doing this at const time.
2019-11-21T21:39:10.9963763Z - LL | |     unsafe {
2019-11-21T21:39:10.9963970Z - LL | |         *MUTABLE_BEHIND_RAW = 99
2019-11-21T21:39:10.9964191Z -    | |         ^^^^^^^^^^^^^^^^^^^^^^^^ tried to modify constant memory
2019-11-21T21:39:10.9964352Z - ...  |
2019-11-21T21:39:10.9964528Z - LL | |     }
2019-11-21T21:39:10.9964689Z - LL | | };
2019-11-21T21:39:10.9964849Z -    | |__-
2019-11-21T21:39:10.9965198Z - note: lint level defined here
2019-11-21T21:39:10.9965377Z -   --> $DIR/mutable_const.rs:4:9
2019-11-21T21:39:10.9965532Z -    |
2019-11-21T21:39:10.9965728Z - LL | #![deny(const_err)]
---
2019-11-21T21:39:10.9966685Z 
2019-11-21T21:39:10.9966711Z 
2019-11-21T21:39:10.9966754Z The actual stderr differed from the expected stderr.
2019-11-21T21:39:10.9967088Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_const/mutable_const.stderr
2019-11-21T21:39:10.9967354Z To update references, rerun the tests and pass the `--bless` flag
2019-11-21T21:39:10.9967620Z To only update this specific test, also pass `--test-args consts/miri_unleashed/mutable_const.rs`
2019-11-21T21:39:10.9967834Z error: 1 errors occurred comparing output.
2019-11-21T21:39:10.9967879Z status: exit code: 1
2019-11-21T21:39:10.9967879Z status: exit code: 1
2019-11-21T21:39:10.9968713Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/miri_unleashed/mutable_const.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_const" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zunleash-the-miri-inside-of-you" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_const/auxiliary" "-A" "unused"
2019-11-21T21:39:10.9969056Z ------------------------------------------
2019-11-21T21:39:10.9969110Z 
2019-11-21T21:39:10.9969327Z ------------------------------------------
2019-11-21T21:39:10.9969372Z stderr:
2019-11-21T21:39:10.9969372Z stderr:
2019-11-21T21:39:10.9969700Z ------------------------------------------
2019-11-21T21:39:10.9969888Z error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-21T21:39:10.9970194Z    |
2019-11-21T21:39:10.9970194Z    |
2019-11-21T21:39:10.9970246Z LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
2019-11-21T21:39:10.9970324Z 
2019-11-21T21:39:10.9970379Z warning: skipping const checks
2019-11-21T21:39:10.9970611Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_const.rs:15:9
2019-11-21T21:39:10.9970656Z    |
2019-11-21T21:39:10.9970656Z    |
2019-11-21T21:39:10.9970719Z LL |         *MUTABLE_BEHIND_RAW = 99 //~ WARN skipping const checks
2019-11-21T21:39:10.9970790Z 
2019-11-21T21:39:10.9970846Z error: aborting due to previous error
2019-11-21T21:39:10.9970872Z 
2019-11-21T21:39:10.9971280Z For more information about this error, try `rustc --explain E0492`.
2019-11-21T21:39:10.9971280Z For more information about this error, try `rustc --explain E0492`.
2019-11-21T21:39:10.9971316Z 
2019-11-21T21:39:10.9971530Z ------------------------------------------
2019-11-21T21:39:10.9971579Z 
2019-11-21T21:39:10.9971600Z 
2019-11-21T21:39:10.9971810Z ---- [ui] ui/consts/miri_unleashed/mutable_references_ice.rs stdout ----
2019-11-21T21:39:10.9971848Z 
2019-11-21T21:39:10.9971908Z error: Error: expected failure status (Some(101)) but received status Some(1).
2019-11-21T21:39:10.9971949Z status: exit code: 1
2019-11-21T21:39:10.9972694Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/miri_unleashed/mutable_references_ice.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references_ice" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zunleash-the-miri-inside-of-you" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references_ice/auxiliary" "-A" "unused"
2019-11-21T21:39:10.9972989Z ------------------------------------------
2019-11-21T21:39:10.9973115Z 
2019-11-21T21:39:10.9973329Z ------------------------------------------
2019-11-21T21:39:10.9973369Z stderr:
2019-11-21T21:39:10.9973369Z stderr:
2019-11-21T21:39:10.9973572Z ------------------------------------------
2019-11-21T21:39:10.9973622Z error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-21T21:39:10.9973920Z    |
2019-11-21T21:39:10.9973920Z    |
2019-11-21T21:39:10.9973960Z LL |     x: &UnsafeCell::new(42), //~ WARN: skipping const checks
2019-11-21T21:39:10.9974024Z 
2019-11-21T21:39:10.9974079Z error: aborting due to previous error
2019-11-21T21:39:10.9974104Z 
2019-11-21T21:39:10.9974323Z For more information about this error, try `rustc --explain E0492`.
---
2019-11-21T21:39:10.9975079Z - warning: skipping const checks
2019-11-21T21:39:10.9975142Z + error[E0017]: references in statics may only refer to immutable values
2019-11-21T21:39:10.9975335Z 2   --> $DIR/mutable_references.rs:8:26
2019-11-21T21:39:10.9975374Z 3    |
2019-11-21T21:39:10.9975412Z 4 LL | static FOO: &&mut u32 = &&mut 42;
2019-11-21T21:39:10.9975639Z -    |                          ^^^^^^^
2019-11-21T21:39:10.9975685Z +    |                          ^^^^^^^ statics require immutable values
2019-11-21T21:39:10.9975742Z 6 
2019-11-21T21:39:10.9975926Z - warning: skipping const checks
2019-11-21T21:39:10.9975926Z - warning: skipping const checks
2019-11-21T21:39:10.9975972Z + error[E0017]: references in statics may only refer to immutable values
2019-11-21T21:39:10.9976160Z 8   --> $DIR/mutable_references.rs:11:23
2019-11-21T21:39:10.9976217Z 9    |
2019-11-21T21:39:10.9976260Z 10 LL | static BAR: &mut () = &mut ();
2019-11-21T21:39:10.9976484Z -    |                       ^^^^^^^
2019-11-21T21:39:10.9976529Z +    |                       ^^^^^^^ statics require immutable values
2019-11-21T21:39:10.9976567Z 12 
2019-11-21T21:39:10.9976744Z - warning: skipping const checks
2019-11-21T21:39:10.9976744Z - warning: skipping const checks
2019-11-21T21:39:10.9976806Z + error[E0017]: references in statics may only refer to immutable values
2019-11-21T21:39:10.9976995Z 14   --> $DIR/mutable_references.rs:16:28
2019-11-21T21:39:10.9977034Z 15    |
2019-11-21T21:39:10.9977091Z 16 LL | static BOO: &mut Foo<()> = &mut Foo(());
2019-11-21T21:39:10.9977303Z -    |                            ^^^^^^^^^^^^
2019-11-21T21:39:10.9977444Z +    |                            ^^^^^^^^^^^^ statics require immutable values
2019-11-21T21:39:10.9977489Z 18 
2019-11-21T21:39:10.9977690Z - warning: skipping const checks
2019-11-21T21:39:10.9977690Z - warning: skipping const checks
2019-11-21T21:39:10.9977740Z + error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-21T21:39:10.9978002Z 21    |
2019-11-21T21:39:10.9978038Z 22 LL |     x: &UnsafeCell::new(42),
2019-11-21T21:39:10.9978080Z 
2019-11-21T21:39:10.9978116Z 23    |        ^^^^^^^^^^^^^^^^^^^^
2019-11-21T21:39:10.9978116Z 23    |        ^^^^^^^^^^^^^^^^^^^^
2019-11-21T21:39:10.9978151Z 24 
2019-11-21T21:39:10.9978328Z - warning: skipping const checks
2019-11-21T21:39:10.9978391Z + error[E0017]: references in statics may only refer to immutable values
2019-11-21T21:39:10.9978581Z 26   --> $DIR/mutable_references.rs:30:27
2019-11-21T21:39:10.9978621Z 27    |
2019-11-21T21:39:10.9978676Z 28 LL | static OH_YES: &mut i32 = &mut 42;
2019-11-21T21:39:10.9978890Z -    |                           ^^^^^^^
2019-11-21T21:39:10.9978935Z +    |                           ^^^^^^^ statics require immutable values
2019-11-21T21:39:10.9978990Z 30 
2019-11-21T21:39:10.9978990Z 30 
2019-11-21T21:39:10.9979033Z 31 error[E0594]: cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
2019-11-21T21:39:10.9979391Z 
2019-11-21T21:39:10.9979391Z 
2019-11-21T21:39:10.9979428Z 34 LL |     *OH_YES = 99;
2019-11-21T21:39:10.9979520Z 36 
2019-11-21T21:39:10.9979703Z - error: aborting due to previous error
2019-11-21T21:39:10.9979745Z + error: aborting due to 6 previous errors
2019-11-21T21:39:10.9979780Z 38 
2019-11-21T21:39:10.9979780Z 38 
2019-11-21T21:39:10.9980007Z - For more information about this error, try `rustc --explain E0594`.
2019-11-21T21:39:10.9980054Z + Some errors have detailed explanations: E0017, E0492, E0594.
2019-11-21T21:39:10.9980263Z + For more information about an error, try `rustc --explain E0017`.
2019-11-21T21:39:10.9980330Z 40 
2019-11-21T21:39:10.9980353Z 
2019-11-21T21:39:10.9980375Z 
2019-11-21T21:39:10.9980413Z The actual stderr differed from the expected stderr.
2019-11-21T21:39:10.9980720Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references/mutable_references.stderr
2019-11-21T21:39:10.9980946Z To update references, rerun the tests and pass the `--bless` flag
2019-11-21T21:39:10.9981190Z To only update this specific test, also pass `--test-args consts/miri_unleashed/mutable_references.rs`
2019-11-21T21:39:10.9981279Z error: 1 errors occurred comparing output.
2019-11-21T21:39:10.9981316Z status: exit code: 1
2019-11-21T21:39:10.9981316Z status: exit code: 1
2019-11-21T21:39:10.9982062Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zunleash-the-miri-inside-of-you" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references/auxiliary" "-A" "unused"
2019-11-21T21:39:10.9982365Z ------------------------------------------
2019-11-21T21:39:10.9982394Z 
2019-11-21T21:39:10.9982579Z ------------------------------------------
2019-11-21T21:39:10.9982636Z stderr:
2019-11-21T21:39:10.9982636Z stderr:
2019-11-21T21:39:10.9982820Z ------------------------------------------
2019-11-21T21:39:10.9982865Z error[E0017]: references in statics may only refer to immutable values
2019-11-21T21:39:10.9983101Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs:8:26
2019-11-21T21:39:10.9983144Z    |
2019-11-21T21:39:10.9983181Z LL | static FOO: &&mut u32 = &&mut 42;
2019-11-21T21:39:10.9983311Z    |                          ^^^^^^^ statics require immutable values
2019-11-21T21:39:10.9983384Z error[E0017]: references in statics may only refer to immutable values
2019-11-21T21:39:10.9983632Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs:11:23
2019-11-21T21:39:10.9983702Z    |
2019-11-21T21:39:10.9983702Z    |
2019-11-21T21:39:10.9983739Z LL | static BAR: &mut () = &mut ();
2019-11-21T21:39:10.9983780Z    |                       ^^^^^^^ statics require immutable values
2019-11-21T21:39:10.9983863Z error[E0017]: references in statics may only refer to immutable values
2019-11-21T21:39:10.9984088Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs:16:28
2019-11-21T21:39:10.9984130Z    |
2019-11-21T21:39:10.9984130Z    |
2019-11-21T21:39:10.9984186Z LL | static BOO: &mut Foo<()> = &mut Foo(());
2019-11-21T21:39:10.9984231Z    |                            ^^^^^^^^^^^^ statics require immutable values
2019-11-21T21:39:10.9984258Z 
2019-11-21T21:39:10.9984325Z error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-21T21:39:10.9984598Z    |
2019-11-21T21:39:10.9984736Z LL |     x: &UnsafeCell::new(42),
2019-11-21T21:39:10.9984774Z    |        ^^^^^^^^^^^^^^^^^^^^
2019-11-21T21:39:10.9984800Z 
2019-11-21T21:39:10.9984800Z 
2019-11-21T21:39:10.9984838Z error[E0017]: references in statics may only refer to immutable values
2019-11-21T21:39:10.9985107Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs:30:27
2019-11-21T21:39:10.9985150Z    |
2019-11-21T21:39:10.9985186Z LL | static OH_YES: &mut i32 = &mut 42;
2019-11-21T21:39:10.9985246Z    |                           ^^^^^^^ statics require immutable values
2019-11-21T21:39:10.9985274Z 
2019-11-21T21:39:10.9985315Z error[E0594]: cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
2019-11-21T21:39:10.9985606Z    |
2019-11-21T21:39:10.9985606Z    |
2019-11-21T21:39:10.9985651Z LL |     *OH_YES = 99; //~ ERROR cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
2019-11-21T21:39:10.9985743Z 
2019-11-21T21:39:10.9985779Z error: aborting due to 6 previous errors
2019-11-21T21:39:10.9985804Z 
2019-11-21T21:39:10.9985842Z Some errors have detailed explanations: E0017, E0492, E0594.
---
2019-11-21T21:39:11.0006365Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-21T21:39:11.0006447Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-21T21:39:11.0022694Z 
2019-11-21T21:39:11.0022781Z 
2019-11-21T21:39:11.0024864Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-21T21:39:11.0025184Z 
2019-11-21T21:39:11.0025216Z 
2019-11-21T21:39:11.0032749Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-21T21:39:11.0032903Z Build completed unsuccessfully in 1:02:03
2019-11-21T21:39:11.0032903Z Build completed unsuccessfully in 1:02:03
2019-11-21T21:39:11.0098327Z == clock drift check ==
2019-11-21T21:39:11.0117371Z   local time: Thu Nov 21 21:39:11 UTC 2019
2019-11-21T21:39:11.1506496Z   network time: Thu, 21 Nov 2019 21:39:11 GMT
2019-11-21T21:39:11.1506885Z == end clock drift check ==
2019-11-21T21:39:12.0028194Z 
2019-11-21T21:39:12.0149972Z ##[error]Bash exited with code '1'.
2019-11-21T21:39:12.0193993Z ##[section]Starting: Checkout
2019-11-21T21:39:12.0195908Z ==============================================================================
2019-11-21T21:39:12.0195968Z Task         : Get sources
2019-11-21T21:39:12.0196021Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Nov 23, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-23T01:00:22.1304366Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-23T01:00:22.1466494Z ##[command]git config gc.auto 0
2019-11-23T01:00:22.1541712Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-23T01:00:22.1602757Z ##[command]git config --get-all http.proxy
2019-11-23T01:00:22.1737724Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66606/merge:refs/remotes/pull/66606/merge
---
2019-11-23T01:59:44.8863339Z .............i...................................................................................... 4800/9264
2019-11-23T01:59:54.1417972Z .................................................................................................... 4900/9264
2019-11-23T01:59:58.9383284Z .................................................................................................... 5000/9264
2019-11-23T02:00:08.4462329Z .................................................................................................... 5100/9264
2019-11-23T02:00:13.7258432Z ...ii.ii...........i................................................................................ 5200/9264
2019-11-23T02:00:23.6017425Z .................................................................................................... 5400/9264
2019-11-23T02:00:33.6001586Z .....................................................................................i.............. 5500/9264
2019-11-23T02:00:41.5053946Z .................................................................................................... 5600/9264
2019-11-23T02:00:47.2557541Z .................................................................................................... 5700/9264
2019-11-23T02:00:47.2557541Z .................................................................................................... 5700/9264
2019-11-23T02:00:57.2284873Z .......................................................................ii...i..ii............i...... 5800/9264
2019-11-23T02:01:19.3132348Z .................................................................................................... 6000/9264
2019-11-23T02:01:24.2887672Z .................................................................................................... 6100/9264
2019-11-23T02:01:24.2887672Z .................................................................................................... 6100/9264
2019-11-23T02:01:28.3314024Z ..............................................................................................i..ii. 6200/9264
2019-11-23T02:01:50.4840610Z .................................................................................................... 6400/9264
2019-11-23T02:01:59.4018674Z ...............................................................i.................................... 6500/9264
2019-11-23T02:02:01.4765620Z .................................................................................................... 6600/9264
2019-11-23T02:02:03.6604600Z ...................................................i................................................ 6700/9264
---
2019-11-23T02:06:37.2972561Z ---- [ui] ui/consts/miri_unleashed/mutable_const.rs stdout ----
2019-11-23T02:06:37.2972621Z diff of stderr:
2019-11-23T02:06:37.2972657Z 
2019-11-23T02:06:37.2972907Z - warning: skipping const checks
2019-11-23T02:06:37.2972979Z + error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-23T02:06:37.2973283Z 3    |
2019-11-23T02:06:37.2973283Z 3    |
2019-11-23T02:06:37.2973334Z 4 LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
2019-11-23T02:06:37.2973432Z 5    |                                      ^^^^^^^^^^^^^^^^^^^^
2019-11-23T02:06:37.2973477Z 6 
2019-11-23T02:06:37.2973692Z - warning: skipping const checks
2019-11-23T02:06:37.2973755Z + error[E0019]: constant contains unimplemented expression type
2019-11-23T02:06:37.2973755Z + error[E0019]: constant contains unimplemented expression type
2019-11-23T02:06:37.2973993Z 8   --> $DIR/mutable_const.rs:15:9
2019-11-23T02:06:37.2974039Z 9    |
2019-11-23T02:06:37.2974083Z 10 LL |         *MUTABLE_BEHIND_RAW = 99
2019-11-23T02:06:37.2974173Z 11    |         ^^^^^^^^^^^^^^^^^^^^^^^^
2019-11-23T02:06:37.2974214Z 12 
2019-11-23T02:06:37.2974442Z - error: any use of this value will cause an error
2019-11-23T02:06:37.2974682Z -   --> $DIR/mutable_const.rs:15:9
2019-11-23T02:06:37.2974682Z -   --> $DIR/mutable_const.rs:15:9
2019-11-23T02:06:37.2975287Z -    |
2019-11-23T02:06:37.2975641Z - LL | / const MUTATING_BEHIND_RAW: () = {
2019-11-23T02:06:37.2976055Z - LL | |     // Test that `MUTABLE_BEHIND_RAW` is actually immutable, by doing this at const time.
2019-11-23T02:06:37.2976211Z - LL | |     unsafe {
2019-11-23T02:06:37.2976376Z - LL | |         *MUTABLE_BEHIND_RAW = 99
2019-11-23T02:06:37.2976587Z -    | |         ^^^^^^^^^^^^^^^^^^^^^^^^ tried to modify constant memory
2019-11-23T02:06:37.2976739Z - ...  |
2019-11-23T02:06:37.2976878Z - LL | |     }
2019-11-23T02:06:37.2977015Z - LL | | };
2019-11-23T02:06:37.2977177Z -    | |__-
2019-11-23T02:06:37.2977463Z - note: lint level defined here
2019-11-23T02:06:37.2977644Z -   --> $DIR/mutable_const.rs:4:9
2019-11-23T02:06:37.2977778Z -    |
2019-11-23T02:06:37.2977925Z - LL | #![deny(const_err)]
---
2019-11-23T02:06:37.2978963Z 
2019-11-23T02:06:37.2978983Z 
2019-11-23T02:06:37.2979018Z The actual stderr differed from the expected stderr.
2019-11-23T02:06:37.2979291Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_const/mutable_const.stderr
2019-11-23T02:06:37.2979485Z To update references, rerun the tests and pass the `--bless` flag
2019-11-23T02:06:37.2979702Z To only update this specific test, also pass `--test-args consts/miri_unleashed/mutable_const.rs`
2019-11-23T02:06:37.2979781Z error: 1 errors occurred comparing output.
2019-11-23T02:06:37.2979823Z status: exit code: 1
2019-11-23T02:06:37.2979823Z status: exit code: 1
2019-11-23T02:06:37.2980664Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/miri_unleashed/mutable_const.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_const" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zunleash-the-miri-inside-of-you" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_const/auxiliary" "-A" "unused"
2019-11-23T02:06:37.2981628Z ------------------------------------------
2019-11-23T02:06:37.2981659Z 
2019-11-23T02:06:37.2982028Z ------------------------------------------
2019-11-23T02:06:37.2982088Z stderr:
2019-11-23T02:06:37.2982088Z stderr:
2019-11-23T02:06:37.2982279Z ------------------------------------------
2019-11-23T02:06:37.2982339Z error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-23T02:06:37.2982634Z    |
2019-11-23T02:06:37.2982634Z    |
2019-11-23T02:06:37.2982678Z LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
2019-11-23T02:06:37.2982771Z 
2019-11-23T02:06:37.2982812Z error[E0019]: constant contains unimplemented expression type
2019-11-23T02:06:37.2983543Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_const.rs:15:9
2019-11-23T02:06:37.2983613Z    |
2019-11-23T02:06:37.2983613Z    |
2019-11-23T02:06:37.2983659Z LL |         *MUTABLE_BEHIND_RAW = 99 //~ WARN skipping const checks
2019-11-23T02:06:37.2983737Z 
2019-11-23T02:06:37.2983799Z error: aborting due to 2 previous errors
2019-11-23T02:06:37.2983827Z 
2019-11-23T02:06:37.2983881Z Some errors have detailed explanations: E0019, E0492.
---
2019-11-23T02:06:37.2984995Z - warning: skipping const checks
2019-11-23T02:06:37.2985057Z + error[E0017]: references in statics may only refer to immutable values
2019-11-23T02:06:37.2985275Z 2   --> $DIR/mutable_references.rs:8:26
2019-11-23T02:06:37.2985319Z 3    |
2019-11-23T02:06:37.2985382Z 4 LL | static FOO: &&mut u32 = &&mut 42;
2019-11-23T02:06:37.2985618Z -    |                          ^^^^^^^
2019-11-23T02:06:37.2985789Z +    |                          ^^^^^^^ statics require immutable values
2019-11-23T02:06:37.2985843Z 6 
2019-11-23T02:06:37.2986070Z - warning: skipping const checks
2019-11-23T02:06:37.2986070Z - warning: skipping const checks
2019-11-23T02:06:37.2986121Z + error[E0017]: references in statics may only refer to immutable values
2019-11-23T02:06:37.2986520Z 8   --> $DIR/mutable_references.rs:11:23
2019-11-23T02:06:37.2986559Z 9    |
2019-11-23T02:06:37.2986762Z 10 LL | static BAR: &mut () = &mut ();
2019-11-23T02:06:37.2986974Z -    |                       ^^^^^^^
2019-11-23T02:06:37.2987016Z +    |                       ^^^^^^^ statics require immutable values
2019-11-23T02:06:37.2987078Z 12 
2019-11-23T02:06:37.2987247Z - warning: skipping const checks
2019-11-23T02:06:37.2987247Z - warning: skipping const checks
2019-11-23T02:06:37.2987289Z + error[E0017]: references in statics may only refer to immutable values
2019-11-23T02:06:37.2987465Z 14   --> $DIR/mutable_references.rs:16:28
2019-11-23T02:06:37.2987519Z 15    |
2019-11-23T02:06:37.2987556Z 16 LL | static BOO: &mut Foo<()> = &mut Foo(());
2019-11-23T02:06:37.2987782Z -    |                            ^^^^^^^^^^^^
2019-11-23T02:06:37.2987827Z +    |                            ^^^^^^^^^^^^ statics require immutable values
2019-11-23T02:06:37.2987863Z 18 
2019-11-23T02:06:37.2988029Z - warning: skipping const checks
2019-11-23T02:06:37.2988029Z - warning: skipping const checks
2019-11-23T02:06:37.2988092Z + error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-23T02:06:37.2988307Z 21    |
2019-11-23T02:06:37.2988360Z 22 LL |     x: &UnsafeCell::new(42),
2019-11-23T02:06:37.2988455Z 
2019-11-23T02:06:37.2988495Z 23    |        ^^^^^^^^^^^^^^^^^^^^
2019-11-23T02:06:37.2988495Z 23    |        ^^^^^^^^^^^^^^^^^^^^
2019-11-23T02:06:37.2988529Z 24 
2019-11-23T02:06:37.2988736Z - warning: skipping const checks
2019-11-23T02:06:37.2988779Z + error[E0017]: references in statics may only refer to immutable values
2019-11-23T02:06:37.2988956Z 26   --> $DIR/mutable_references.rs:30:27
2019-11-23T02:06:37.2989013Z 27    |
2019-11-23T02:06:37.2989049Z 28 LL | static OH_YES: &mut i32 = &mut 42;
2019-11-23T02:06:37.2989253Z -    |                           ^^^^^^^
2019-11-23T02:06:37.2989313Z +    |                           ^^^^^^^ statics require immutable values
2019-11-23T02:06:37.2989349Z 30 
2019-11-23T02:06:37.2989349Z 30 
2019-11-23T02:06:37.2989389Z 31 error[E0594]: cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
2019-11-23T02:06:37.2989611Z 
2019-11-23T02:06:37.2989611Z 
2019-11-23T02:06:37.2989645Z 34 LL |     *OH_YES = 99;
2019-11-23T02:06:37.2989744Z 36 
2019-11-23T02:06:37.2989916Z - error: aborting due to previous error
2019-11-23T02:06:37.2989956Z + error: aborting due to 6 previous errors
2019-11-23T02:06:37.2990007Z 38 
2019-11-23T02:06:37.2990007Z 38 
2019-11-23T02:06:37.2990206Z - For more information about this error, try `rustc --explain E0594`.
2019-11-23T02:06:37.2990250Z + Some errors have detailed explanations: E0017, E0492, E0594.
2019-11-23T02:06:37.2990471Z + For more information about an error, try `rustc --explain E0017`.
2019-11-23T02:06:37.2990509Z 40 
2019-11-23T02:06:37.2990531Z 
2019-11-23T02:06:37.2990552Z 
2019-11-23T02:06:37.2990606Z The actual stderr differed from the expected stderr.
2019-11-23T02:06:37.2990875Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references/mutable_references.stderr
2019-11-23T02:06:37.2991080Z To update references, rerun the tests and pass the `--bless` flag
2019-11-23T02:06:37.2991569Z To only update this specific test, also pass `--test-args consts/miri_unleashed/mutable_references.rs`
2019-11-23T02:06:37.2991643Z error: 1 errors occurred comparing output.
2019-11-23T02:06:37.2991699Z status: exit code: 1
2019-11-23T02:06:37.2991699Z status: exit code: 1
2019-11-23T02:06:37.2993004Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zunleash-the-miri-inside-of-you" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references/auxiliary" "-A" "unused"
2019-11-23T02:06:37.2993377Z ------------------------------------------
2019-11-23T02:06:37.2993420Z 
2019-11-23T02:06:37.2993659Z ------------------------------------------
2019-11-23T02:06:37.2993705Z stderr:
2019-11-23T02:06:37.2993705Z stderr:
2019-11-23T02:06:37.2993914Z ------------------------------------------
2019-11-23T02:06:37.2993984Z error[E0017]: references in statics may only refer to immutable values
2019-11-23T02:06:37.2994238Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs:8:26
2019-11-23T02:06:37.2994288Z    |
2019-11-23T02:06:37.2994358Z LL | static FOO: &&mut u32 = &&mut 42;
2019-11-23T02:06:37.2994410Z    |                          ^^^^^^^ statics require immutable values
2019-11-23T02:06:37.2994487Z error[E0017]: references in statics may only refer to immutable values
2019-11-23T02:06:37.2994767Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs:11:23
2019-11-23T02:06:37.2994816Z    |
2019-11-23T02:06:37.2994816Z    |
2019-11-23T02:06:37.2994860Z LL | static BAR: &mut () = &mut ();
2019-11-23T02:06:37.2994928Z    |                       ^^^^^^^ statics require immutable values
2019-11-23T02:06:37.2995109Z error[E0017]: references in statics may only refer to immutable values
2019-11-23T02:06:37.2995544Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs:16:28
2019-11-23T02:06:37.2995769Z    |
2019-11-23T02:06:37.2995769Z    |
2019-11-23T02:06:37.2995806Z LL | static BOO: &mut Foo<()> = &mut Foo(());
2019-11-23T02:06:37.2995850Z    |                            ^^^^^^^^^^^^ statics require immutable values
2019-11-23T02:06:37.2995902Z 
2019-11-23T02:06:37.2996107Z error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-23T02:06:37.2996541Z    |
2019-11-23T02:06:37.2996575Z LL |     x: &UnsafeCell::new(42),
2019-11-23T02:06:37.2996611Z    |        ^^^^^^^^^^^^^^^^^^^^
2019-11-23T02:06:37.2996633Z 
2019-11-23T02:06:37.2996633Z 
2019-11-23T02:06:37.2996688Z error[E0017]: references in statics may only refer to immutable values
2019-11-23T02:06:37.2996904Z   --> /checkout/src/test/ui/consts/miri_unleashed/mutable_references.rs:30:27
2019-11-23T02:06:37.2997140Z    |
2019-11-23T02:06:37.2997195Z LL | static OH_YES: &mut i32 = &mut 42;
2019-11-23T02:06:37.2997235Z    |                           ^^^^^^^ statics require immutable values
2019-11-23T02:06:37.2997261Z 
2019-11-23T02:06:37.2997300Z error[E0594]: cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
2019-11-23T02:06:37.2997573Z    |
2019-11-23T02:06:37.2997573Z    |
2019-11-23T02:06:37.2997615Z LL |     *OH_YES = 99; //~ ERROR cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
2019-11-23T02:06:37.2997698Z 
2019-11-23T02:06:37.2997733Z error: aborting due to 6 previous errors
2019-11-23T02:06:37.2997756Z 
2019-11-23T02:06:37.2997810Z Some errors have detailed explanations: E0017, E0492, E0594.
2019-11-23T02:06:37.2997810Z Some errors have detailed explanations: E0017, E0492, E0594.
2019-11-23T02:06:37.2998018Z For more information about an error, try `rustc --explain E0017`.
2019-11-23T02:06:37.2998045Z 
2019-11-23T02:06:37.2998236Z ------------------------------------------
2019-11-23T02:06:37.2998261Z 
2019-11-23T02:06:37.2998282Z 
2019-11-23T02:06:37.2998478Z ---- [ui] ui/consts/miri_unleashed/mutable_references_ice.rs stdout ----
2019-11-23T02:06:37.2998505Z 
2019-11-23T02:06:37.2998630Z error: Error: expected failure status (Some(101)) but received status Some(1).
2019-11-23T02:06:37.2998674Z status: exit code: 1
2019-11-23T02:06:37.2999410Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/miri_unleashed/mutable_references_ice.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references_ice" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zunleash-the-miri-inside-of-you" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/miri_unleashed/mutable_references_ice/auxiliary" "-A" "unused"
2019-11-23T02:06:37.2999692Z ------------------------------------------
2019-11-23T02:06:37.2999882Z 
2019-11-23T02:06:37.3000057Z ------------------------------------------
2019-11-23T02:06:37.3000093Z stderr:
2019-11-23T02:06:37.3000093Z stderr:
2019-11-23T02:06:37.3000456Z ------------------------------------------
2019-11-23T02:06:37.3000500Z error[E0492]: cannot borrow a constant which may contain interior mutability, create a static instead
2019-11-23T02:06:37.3000760Z    |
2019-11-23T02:06:37.3000760Z    |
2019-11-23T02:06:37.3000796Z LL |     x: &UnsafeCell::new(42), //~ WARN: skipping const checks
2019-11-23T02:06:37.3000871Z 
2019-11-23T02:06:37.3000971Z error: aborting due to previous error
2019-11-23T02:06:37.3000993Z 
2019-11-23T02:06:37.3001203Z For more information about this error, try `rustc --explain E0492`.
---
2019-11-23T02:06:37.3009009Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-23T02:06:37.3009071Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-23T02:06:37.3019840Z 
2019-11-23T02:06:37.3020134Z 
2019-11-23T02:06:37.3022220Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-23T02:06:37.3022896Z 
2019-11-23T02:06:37.3022942Z 
2019-11-23T02:06:37.3026644Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-23T02:06:37.3026820Z Build completed unsuccessfully in 1:00:25
2019-11-23T02:06:37.3026820Z Build completed unsuccessfully in 1:00:25
2019-11-23T02:06:37.3084735Z == clock drift check ==
2019-11-23T02:06:37.3102380Z   local time: Sat Nov 23 02:06:37 UTC 2019
2019-11-23T02:06:37.8448598Z   network time: Sat, 23 Nov 2019 02:06:37 GMT
2019-11-23T02:06:37.8453153Z == end clock drift check ==
2019-11-23T02:06:38.6107346Z 
2019-11-23T02:06:38.6227116Z ##[error]Bash exited with code '1'.
2019-11-23T02:06:38.6269005Z ##[section]Starting: Checkout
2019-11-23T02:06:38.6270267Z ==============================================================================
2019-11-23T02:06:38.6270310Z Task         : Get sources
2019-11-23T02:06:38.6270346Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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

This comment was marked as outdated.

Copy link
Contributor

bors commented Nov 23, 2019

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

@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Nov 23, 2019

A test for &mut self would be good, too

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Nov 23, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-23T21:16:40.5345903Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-23T21:16:40.5508193Z ##[command]git config gc.auto 0
2019-11-23T21:16:40.5623175Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-23T21:16:40.5629390Z ##[command]git config --get-all http.proxy
2019-11-23T21:16:40.5749163Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66606/merge:refs/remotes/pull/66606/merge
---
2019-11-23T22:11:05.8828584Z .....................F.............................................................................. 1600/9282
2019-11-23T22:11:10.3258713Z .................................................................................................... 1700/9282
2019-11-23T22:11:22.4013941Z .............................i...................................................................... 1800/9282
2019-11-23T22:11:28.6162044Z .................................................................................................... 1900/9282
2019-11-23T22:11:41.4425952Z ..............iiiii................................................................................. 2000/9282
2019-11-23T22:11:50.5452087Z .................................................................................................... 2200/9282
2019-11-23T22:11:52.8808684Z .................................................................................................... 2300/9282
2019-11-23T22:11:57.7944935Z .................................................................................................... 2400/9282
2019-11-23T22:12:17.1231587Z .................................................................................................... 2500/9282
---
2019-11-23T22:14:47.8110306Z ..............i...............i..................................................................... 4800/9282
2019-11-23T22:14:57.4691214Z .................................................................................................... 4900/9282
2019-11-23T22:15:02.8567159Z .................................................................................................... 5000/9282
2019-11-23T22:15:11.9169326Z .................................................................................................... 5100/9282
2019-11-23T22:15:17.6891265Z ...................ii.ii...........i................................................................ 5200/9282
2019-11-23T22:15:27.0837719Z .................................................................................................... 5400/9282
2019-11-23T22:15:36.7786822Z .................................................................................................... 5500/9282
2019-11-23T22:15:44.5873096Z .i.................................................................................................. 5600/9282
2019-11-23T22:15:50.0884141Z .................................................................................................... 5700/9282
2019-11-23T22:15:50.0884141Z .................................................................................................... 5700/9282
2019-11-23T22:15:59.0657211Z .......................................................................................ii...i..ii... 5800/9282
2019-11-23T22:16:20.7796785Z .................................................................................................... 6000/9282
2019-11-23T22:16:28.4515600Z .................................................................................................... 6100/9282
2019-11-23T22:16:32.6362821Z .................................................................................................... 6200/9282
2019-11-23T22:16:32.6362821Z .................................................................................................... 6200/9282
2019-11-23T22:16:45.2135071Z ..........i..ii..................................................................................... 6300/9282
2019-11-23T22:17:02.8423758Z ..............................................................................i..................... 6500/9282
2019-11-23T22:17:04.9849840Z .................................................................................................... 6600/9282
2019-11-23T22:17:07.1268599Z .....................................................................i.............................. 6700/9282
2019-11-23T22:17:09.8857209Z .................................................................................................... 6800/9282
---
2019-11-23T22:21:37.4687012Z 9 
2019-11-23T22:21:37.4687039Z 
2019-11-23T22:21:37.4687080Z 
2019-11-23T22:21:37.4687120Z The actual stderr differed from the expected stderr.
2019-11-23T22:21:37.4687447Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-mut-refs/mutable_references/mutable_references.stderr
2019-11-23T22:21:37.4687707Z To update references, rerun the tests and pass the `--bless` flag
2019-11-23T22:21:37.4687965Z To only update this specific test, also pass `--test-args consts/const-mut-refs/mutable_references.rs`
2019-11-23T22:21:37.4688033Z error: 1 errors occurred comparing output.
2019-11-23T22:21:37.4688090Z status: exit code: 1
2019-11-23T22:21:37.4688090Z status: exit code: 1
2019-11-23T22:21:37.4688790Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const-mut-refs/mutable_references.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-mut-refs/mutable_references" "-Crpath" "-O" "-Cdebuginfo=0" "-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/ui/consts/const-mut-refs/mutable_references/auxiliary" "-A" "unused"
2019-11-23T22:21:37.4689226Z ------------------------------------------
2019-11-23T22:21:37.4689254Z 
2019-11-23T22:21:37.4689466Z ------------------------------------------
2019-11-23T22:21:37.4689504Z stderr:
2019-11-23T22:21:37.4689504Z stderr:
2019-11-23T22:21:37.4689691Z ------------------------------------------
2019-11-23T22:21:37.4689755Z error[E0594]: cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
2019-11-23T22:21:37.4689986Z   --> /checkout/src/test/ui/consts/const-mut-refs/mutable_references.rs:32:5
2019-11-23T22:21:37.4690029Z    |
2019-11-23T22:21:37.4690099Z LL |     *OH_YES = 99; //~ ERROR cannot assign to `*OH_YES`, as `OH_YES` is an immutable static item
2019-11-23T22:21:37.4690168Z 
2019-11-23T22:21:37.4690222Z error: aborting due to previous error
2019-11-23T22:21:37.4690247Z 
2019-11-23T22:21:37.4690466Z For more information about this error, try `rustc --explain E0594`.
---
2019-11-23T22:21:37.4725612Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-23T22:21:37.4725691Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-23T22:21:37.4748769Z 
2019-11-23T22:21:37.4750534Z 
2019-11-23T22:21:37.4753840Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-23T22:21:37.4754471Z 
2019-11-23T22:21:37.4754508Z 
2019-11-23T22:21:37.4764029Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-23T22:21:37.4764295Z Build completed unsuccessfully in 0:59:06
2019-11-23T22:21:37.4764295Z Build completed unsuccessfully in 0:59:06
2019-11-23T22:21:37.4819540Z == clock drift check ==
2019-11-23T22:21:37.4831617Z   local time: Sat Nov 23 22:21:37 UTC 2019
2019-11-23T22:21:38.0049798Z   network time: Sat, 23 Nov 2019 22:21:38 GMT
2019-11-23T22:21:38.0050887Z == end clock drift check ==
2019-11-23T22:21:38.8714258Z 
2019-11-23T22:21:38.8810914Z ##[error]Bash exited with code '1'.
2019-11-23T22:21:38.8843155Z ##[section]Starting: Checkout
2019-11-23T22:21:38.8844653Z ==============================================================================
2019-11-23T22:21:38.8844699Z Task         : Get sources
2019-11-23T22:21:38.8844868Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@Centril

This comment has been minimized.

Copy link
Member

Centril commented Nov 23, 2019

Seems like rebase gone wrong?

@christianpoveda christianpoveda force-pushed the christianpoveda:mut-refs-in-const-fn branch from e181c95 to 38c05b9 Nov 23, 2019
@christianpoveda

This comment has been minimized.

Copy link
Contributor Author

christianpoveda commented Nov 23, 2019

Seems like rebase gone wrong?

Yep D: I think I fixed it

@christianpoveda

This comment has been minimized.

Copy link
Contributor Author

christianpoveda commented Nov 25, 2019

@oli-obk @Centril Is it there anything else to be done here?

@christianpoveda christianpoveda force-pushed the christianpoveda:mut-refs-in-const-fn branch from 38c05b9 to 4de9c9a Nov 26, 2019
| ^
|
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
= help: add `#![feature(const_fn)]` to the crate attributes to enable

This comment has been minimized.

Copy link
@Centril

Centril Nov 26, 2019

Member

Hmm... it's quite unfortunate that the wrong feature gate is suggested.

This comment has been minimized.

Copy link
@christianpoveda

christianpoveda Nov 26, 2019

Author Contributor

yes :( I'd like to fix it

Edit: I think I found how to do it, working on it.

This comment has been minimized.

Copy link
@christianpoveda

christianpoveda Nov 27, 2019

Author Contributor

I was able to fix it when mutable borrows are done inside constant contexts but not when they are function arguments. This is because that check is done by the const fn qualification and it always suggests the const_fn flag.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 27, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-27T03:44:39.5124345Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-27T03:44:39.5347921Z ##[command]git config gc.auto 0
2019-11-27T03:44:40.5380989Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-27T03:44:40.5389260Z ##[command]git config --get-all http.proxy
2019-11-27T03:44:40.5395396Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66606/merge:refs/remotes/pull/66606/merge
---
2019-11-27T03:49:20.3859141Z Successfully built 91817817496b
2019-11-27T03:49:20.4660158Z Successfully tagged rust-ci:latest
2019-11-27T03:49:20.5358490Z Built container sha256:91817817496b887c0d78e5c266c845e3af407d0ed64b8c6401584401fd133e5c
2019-11-27T03:49:20.5376385Z Uploading finished image to https://rust-lang-ci-sccache2.s3.amazonaws.com/docker/6b5affe011ff1d5f3b21dfc83ec51b259362cc85cfb8f36f49672c02efc91e505476306baee6903f09190f74e5a67b9efc5b48aff5c2d6d0c38ad646ffda3ea7
2019-11-27T03:50:04.7185010Z upload failed: - to s3://rust-lang-ci-sccache2/docker/6b5affe011ff1d5f3b21dfc83ec51b259362cc85cfb8f36f49672c02efc91e505476306baee6903f09190f74e5a67b9efc5b48aff5c2d6d0c38ad646ffda3ea7 An error occurred (InvalidAccessKeyId) when calling the CreateMultipartUpload operation: The AWS Access Key Id you provided does not exist in our records.
2019-11-27T03:50:05.8187046Z [CI_JOB_NAME=x86_64-gnu-llvm-6.0]
2019-11-27T03:50:05.8214724Z == clock drift check ==
2019-11-27T03:50:05.8224321Z   local time: Wed Nov 27 03:50:05 UTC 2019
2019-11-27T03:50:06.0999934Z   network time: Wed, 27 Nov 2019 03:50:06 GMT
---
2019-11-27T04:46:37.7146633Z .................................................................................................... 1600/9297
2019-11-27T04:46:42.3976803Z .................................................................................................... 1700/9297
2019-11-27T04:46:54.8395376Z ..................................i................................................................. 1800/9297
2019-11-27T04:47:02.4972513Z .................................................................................................... 1900/9297
2019-11-27T04:47:16.2255676Z ...................iiiii............................................................................ 2000/9297
2019-11-27T04:47:26.0929044Z .................................................................................................... 2200/9297
2019-11-27T04:47:28.5615267Z ............F....................................................................................... 2300/9297
2019-11-27T04:47:33.4700861Z .................................................................................................... 2400/9297
2019-11-27T04:47:54.6679993Z .................................................................................................... 2500/9297
---
2019-11-27T04:50:33.5653804Z ....................i...............i............................................................... 4800/9297
2019-11-27T04:50:43.7074670Z .................................................................................................... 4900/9297
2019-11-27T04:50:49.5200170Z .................................................................................................... 5000/9297
2019-11-27T04:50:57.9021573Z .................................................................................................... 5100/9297
2019-11-27T04:51:05.2620786Z .........................ii.ii...........i.......................................................... 5200/9297
2019-11-27T04:51:14.4683211Z .................................................................................................... 5400/9297
2019-11-27T04:51:25.1246353Z .................................................................................................... 5500/9297
2019-11-27T04:51:32.1372667Z .......i............................................................................................ 5600/9297
2019-11-27T04:51:38.3858375Z .................................................................................................... 5700/9297
2019-11-27T04:51:38.3858375Z .................................................................................................... 5700/9297
2019-11-27T04:51:49.2302355Z .............................................................................................ii...i. 5800/9297
2019-11-27T04:52:02.0625557Z .ii...........i..................................................................................... 5900/9297
2019-11-27T04:52:20.0253979Z .................................................................................................... 6100/9297
2019-11-27T04:52:26.2294593Z .................................................................................................... 6200/9297
2019-11-27T04:52:26.2294593Z .................................................................................................... 6200/9297
2019-11-27T04:52:40.0787977Z ................i..ii............................................................................... 6300/9297
2019-11-27T04:52:59.6009745Z ....................................................................................i............... 6500/9297
2019-11-27T04:53:01.9302892Z .................................................................................................... 6600/9297
2019-11-27T04:53:04.3202190Z ...........................................................................i........................ 6700/9297
2019-11-27T04:53:07.0737686Z .................................................................................................... 6800/9297
---
2019-11-27T04:57:53.7539023Z - error[E0017]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7539199Z + error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7539573Z 2   --> $DIR/check-static-immutable-mut-slices.rs:3:37
2019-11-27T04:57:53.7539756Z 3    |
2019-11-27T04:57:53.7540103Z 4 LL | static TEST: &'static mut [isize] = &mut [];
2019-11-27T04:57:53.7540404Z 5    |                                     ^^^^^^^ statics require immutable values
2019-11-27T04:57:53.7540527Z +    |
2019-11-27T04:57:53.7540527Z +    |
2019-11-27T04:57:53.7541022Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7541206Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7541471Z 7 error: aborting due to previous error
2019-11-27T04:57:53.7541593Z 8 
2019-11-27T04:57:53.7541695Z 
2019-11-27T04:57:53.7542578Z - For more information about this error, try `rustc --explain E0017`.
2019-11-27T04:57:53.7542578Z - For more information about this error, try `rustc --explain E0017`.
2019-11-27T04:57:53.7543052Z + For more information about this error, try `rustc --explain E0658`.
2019-11-27T04:57:53.7543222Z 10 
2019-11-27T04:57:53.7543374Z 
2019-11-27T04:57:53.7543486Z 
2019-11-27T04:57:53.7543618Z The actual stderr differed from the expected stderr.
2019-11-27T04:57:53.7544090Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/check-static-immutable-mut-slices/check-static-immutable-mut-slices.stderr
2019-11-27T04:57:53.7544532Z To update references, rerun the tests and pass the `--bless` flag
2019-11-27T04:57:53.7547842Z To only update this specific test, also pass `--test-args check-static-immutable-mut-slices.rs`
2019-11-27T04:57:53.7550298Z error: 1 errors occurred comparing output.
2019-11-27T04:57:53.7550359Z status: exit code: 1
2019-11-27T04:57:53.7550359Z status: exit code: 1
2019-11-27T04:57:53.7551330Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/check-static-immutable-mut-slices.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/check-static-immutable-mut-slices" "-Crpath" "-O" "-Cdebuginfo=0" "-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/ui/check-static-immutable-mut-slices/auxiliary" "-A" "unused"
2019-11-27T04:57:53.7551850Z ------------------------------------------
2019-11-27T04:57:53.7552352Z 
2019-11-27T04:57:53.7552665Z ------------------------------------------
2019-11-27T04:57:53.7552713Z stderr:
2019-11-27T04:57:53.7552713Z stderr:
2019-11-27T04:57:53.7552931Z ------------------------------------------
2019-11-27T04:57:53.7553001Z error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7553260Z   --> /checkout/src/test/ui/check-static-immutable-mut-slices.rs:3:37
2019-11-27T04:57:53.7553311Z    |
2019-11-27T04:57:53.7553553Z LL | static TEST: &'static mut [isize] = &mut [];
2019-11-27T04:57:53.7553608Z    |                                     ^^^^^^^ statics require immutable values
2019-11-27T04:57:53.7553664Z    |
2019-11-27T04:57:53.7553994Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7554178Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7554263Z error: aborting due to previous error
2019-11-27T04:57:53.7554309Z 
2019-11-27T04:57:53.7554602Z For more information about this error, try `rustc --explain E0658`.
2019-11-27T04:57:53.7554636Z 
---
2019-11-27T04:57:53.7555602Z - error[E0017]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7555652Z + error[E0658]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7555859Z 2   --> $DIR/E0017.rs:4:30
2019-11-27T04:57:53.7555910Z 3    |
2019-11-27T04:57:53.7556234Z 4 LL | const CR: &'static mut i32 = &mut C;
2019-11-27T04:57:53.7556333Z 5    |                              ^^^^^^ constants require immutable values
2019-11-27T04:57:53.7556376Z +    |
2019-11-27T04:57:53.7556376Z +    |
2019-11-27T04:57:53.7556663Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7556739Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7557075Z - error[E0017]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7557146Z + error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7557371Z 8   --> $DIR/E0017.rs:5:39
2019-11-27T04:57:53.7557415Z 9    |
2019-11-27T04:57:53.7557415Z 9    |
2019-11-27T04:57:53.7557673Z 10 LL | static STATIC_REF: &'static mut i32 = &mut X;
2019-11-27T04:57:53.7557708Z 
2019-11-27T04:57:53.7557756Z 11    |                                       ^^^^^^ statics require immutable values
2019-11-27T04:57:53.7557810Z +    |
2019-11-27T04:57:53.7558131Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7558196Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7558305Z 13 error[E0596]: cannot borrow immutable static item `X` as mutable
2019-11-27T04:57:53.7558544Z 14   --> $DIR/E0017.rs:5:39
2019-11-27T04:57:53.7558576Z 
2019-11-27T04:57:53.7558830Z 16 LL | static STATIC_REF: &'static mut i32 = &mut X;
---
2019-11-27T04:57:53.7559848Z 22 LL | static CONST_REF: &'static mut i32 = &mut C;
2019-11-27T04:57:53.7559968Z 
2019-11-27T04:57:53.7560013Z 23    |                                      ^^^^^^ statics require immutable values
2019-11-27T04:57:53.7560080Z +    |
2019-11-27T04:57:53.7560379Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7560433Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7560531Z 25 error: aborting due to 4 previous errors
2019-11-27T04:57:53.7560569Z 26 
2019-11-27T04:57:53.7560593Z 
2019-11-27T04:57:53.7560838Z - Some errors have detailed explanations: E0017, E0596.
2019-11-27T04:57:53.7560838Z - Some errors have detailed explanations: E0017, E0596.
2019-11-27T04:57:53.7561066Z - For more information about an error, try `rustc --explain E0017`.
2019-11-27T04:57:53.7561113Z + Some errors have detailed explanations: E0596, E0658.
2019-11-27T04:57:53.7561354Z + For more information about an error, try `rustc --explain E0596`.
2019-11-27T04:57:53.7561396Z 29 
2019-11-27T04:57:53.7561419Z 
2019-11-27T04:57:53.7561451Z 
2019-11-27T04:57:53.7561509Z The actual stderr differed from the expected stderr.
2019-11-27T04:57:53.7562329Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0017/E0017.stderr
2019-11-27T04:57:53.7562693Z To update references, rerun the tests and pass the `--bless` flag
2019-11-27T04:57:53.7562982Z To only update this specific test, also pass `--test-args error-codes/E0017.rs`
2019-11-27T04:57:53.7563061Z error: 1 errors occurred comparing output.
2019-11-27T04:57:53.7563122Z status: exit code: 1
2019-11-27T04:57:53.7563122Z status: exit code: 1
2019-11-27T04:57:53.7563855Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0017.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0017" "-Crpath" "-O" "-Cdebuginfo=0" "-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/ui/error-codes/E0017/auxiliary" "-A" "unused"
2019-11-27T04:57:53.7564195Z ------------------------------------------
2019-11-27T04:57:53.7564229Z 
2019-11-27T04:57:53.7564442Z ------------------------------------------
2019-11-27T04:57:53.7564504Z stderr:
2019-11-27T04:57:53.7564504Z stderr:
2019-11-27T04:57:53.7564714Z ------------------------------------------
2019-11-27T04:57:53.7564766Z error[E0658]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7565017Z   --> /checkout/src/test/ui/error-codes/E0017.rs:4:30
2019-11-27T04:57:53.7565065Z    |
2019-11-27T04:57:53.7565409Z LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
2019-11-27T04:57:53.7565476Z    |                              ^^^^^^ constants require immutable values
2019-11-27T04:57:53.7565517Z    |
2019-11-27T04:57:53.7565789Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7565868Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7565939Z error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7566196Z   --> /checkout/src/test/ui/error-codes/E0017.rs:5:39
2019-11-27T04:57:53.7566240Z    |
2019-11-27T04:57:53.7566240Z    |
2019-11-27T04:57:53.7566466Z LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
2019-11-27T04:57:53.7566534Z    |                                       ^^^^^^ statics require immutable values
2019-11-27T04:57:53.7566576Z    |
2019-11-27T04:57:53.7566836Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7566904Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7566976Z error[E0596]: cannot borrow immutable static item `X` as mutable
2019-11-27T04:57:53.7567324Z   --> /checkout/src/test/ui/error-codes/E0017.rs:5:39
2019-11-27T04:57:53.7567385Z    |
2019-11-27T04:57:53.7567385Z    |
2019-11-27T04:57:53.7567748Z LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
2019-11-27T04:57:53.7567848Z 
2019-11-27T04:57:53.7567899Z error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7568127Z   --> /checkout/src/test/ui/error-codes/E0017.rs:7:38
2019-11-27T04:57:53.7601422Z    |
2019-11-27T04:57:53.7601422Z    |
2019-11-27T04:57:53.7602104Z LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
2019-11-27T04:57:53.7602170Z    |                                      ^^^^^^ statics require immutable values
2019-11-27T04:57:53.7602229Z    |
2019-11-27T04:57:53.7602579Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7602640Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7602732Z error: aborting due to 4 previous errors
2019-11-27T04:57:53.7602761Z 
2019-11-27T04:57:53.7602804Z Some errors have detailed explanations: E0596, E0658.
2019-11-27T04:57:53.7603105Z For more information about an error, try `rustc --explain E0596`.
---
2019-11-27T04:57:53.7604172Z - error[E0017]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7604226Z + error[E0658]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7604432Z 2   --> $DIR/E0388.rs:4:30
2019-11-27T04:57:53.7604475Z 3    |
2019-11-27T04:57:53.7604709Z 4 LL | const CR: &'static mut i32 = &mut C;
2019-11-27T04:57:53.7604788Z 5    |                              ^^^^^^ constants require immutable values
2019-11-27T04:57:53.7604843Z +    |
2019-11-27T04:57:53.7604843Z +    |
2019-11-27T04:57:53.7605254Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7605437Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7605738Z - error[E0017]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7605789Z + error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7605987Z 8   --> $DIR/E0388.rs:5:39
2019-11-27T04:57:53.7606027Z 9    |
2019-11-27T04:57:53.7606027Z 9    |
2019-11-27T04:57:53.7606238Z 10 LL | static STATIC_REF: &'static mut i32 = &mut X;
2019-11-27T04:57:53.7606268Z 
2019-11-27T04:57:53.7606319Z 11    |                                       ^^^^^^ statics require immutable values
2019-11-27T04:57:53.7606360Z +    |
2019-11-27T04:57:53.7606621Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7606684Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7606783Z 13 error[E0596]: cannot borrow immutable static item `X` as mutable
2019-11-27T04:57:53.7607123Z 14   --> $DIR/E0388.rs:5:39
2019-11-27T04:57:53.7607153Z 
2019-11-27T04:57:53.7607376Z 16 LL | static STATIC_REF: &'static mut i32 = &mut X;
---
2019-11-27T04:57:53.7609030Z 22 LL | static CONST_REF: &'static mut i32 = &mut C;
2019-11-27T04:57:53.7609133Z 
2019-11-27T04:57:53.7609197Z 23    |                                      ^^^^^^ statics require immutable values
2019-11-27T04:57:53.7609250Z +    |
2019-11-27T04:57:53.7609683Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7609957Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7610071Z 25 error: aborting due to 4 previous errors
2019-11-27T04:57:53.7610130Z 26 
2019-11-27T04:57:53.7610160Z 
2019-11-27T04:57:53.7610566Z - Some errors have detailed explanations: E0017, E0596.
2019-11-27T04:57:53.7610566Z - Some errors have detailed explanations: E0017, E0596.
2019-11-27T04:57:53.7610907Z - For more information about an error, try `rustc --explain E0017`.
2019-11-27T04:57:53.7610966Z + Some errors have detailed explanations: E0596, E0658.
2019-11-27T04:57:53.7611238Z + For more information about an error, try `rustc --explain E0596`.
2019-11-27T04:57:53.7611304Z 29 
2019-11-27T04:57:53.7611332Z 
2019-11-27T04:57:53.7611360Z 
2019-11-27T04:57:53.7611408Z The actual stderr differed from the expected stderr.
2019-11-27T04:57:53.7611749Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0388/E0388.stderr
2019-11-27T04:57:53.7612031Z To update references, rerun the tests and pass the `--bless` flag
2019-11-27T04:57:53.7612891Z To only update this specific test, also pass `--test-args error-codes/E0388.rs`
2019-11-27T04:57:53.7613142Z error: 1 errors occurred comparing output.
2019-11-27T04:57:53.7613202Z status: exit code: 1
2019-11-27T04:57:53.7613202Z status: exit code: 1
2019-11-27T04:57:53.7614078Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0388.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0388" "-Crpath" "-O" "-Cdebuginfo=0" "-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/ui/error-codes/E0388/auxiliary" "-A" "unused"
2019-11-27T04:57:53.7614439Z ------------------------------------------
2019-11-27T04:57:53.7614477Z 
2019-11-27T04:57:53.7614737Z ------------------------------------------
2019-11-27T04:57:53.7614786Z stderr:
2019-11-27T04:57:53.7614786Z stderr:
2019-11-27T04:57:53.7615039Z ------------------------------------------
2019-11-27T04:57:53.7615106Z error[E0658]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7615373Z   --> /checkout/src/test/ui/error-codes/E0388.rs:4:30
2019-11-27T04:57:53.7615439Z    |
2019-11-27T04:57:53.7615701Z LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
2019-11-27T04:57:53.7615802Z    |                              ^^^^^^ constants require immutable values
2019-11-27T04:57:53.7615861Z    |
2019-11-27T04:57:53.7616198Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7616263Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7616363Z error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7616646Z   --> /checkout/src/test/ui/error-codes/E0388.rs:5:39
2019-11-27T04:57:53.7616718Z    |
2019-11-27T04:57:53.7616718Z    |
2019-11-27T04:57:53.7616989Z LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
2019-11-27T04:57:53.7617051Z    |                                       ^^^^^^ statics require immutable values
2019-11-27T04:57:53.7617122Z    |
2019-11-27T04:57:53.7617438Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7617500Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7617599Z error[E0596]: cannot borrow immutable static item `X` as mutable
2019-11-27T04:57:53.7617876Z   --> /checkout/src/test/ui/error-codes/E0388.rs:5:39
2019-11-27T04:57:53.7617926Z    |
2019-11-27T04:57:53.7617926Z    |
2019-11-27T04:57:53.7618203Z LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
2019-11-27T04:57:53.7618296Z 
2019-11-27T04:57:53.7618357Z error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7618760Z   --> /checkout/src/test/ui/error-codes/E0388.rs:7:38
2019-11-27T04:57:53.7618810Z    |
2019-11-27T04:57:53.7618810Z    |
2019-11-27T04:57:53.7619084Z LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
2019-11-27T04:57:53.7619154Z    |                                      ^^^^^^ statics require immutable values
2019-11-27T04:57:53.7619231Z    |
2019-11-27T04:57:53.7619572Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7619633Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7619717Z error: aborting due to 4 previous errors
2019-11-27T04:57:53.7619760Z 
2019-11-27T04:57:53.7619808Z Some errors have detailed explanations: E0596, E0658.
2019-11-27T04:57:53.7620100Z For more information about an error, try `rustc --explain E0596`.
---
2019-11-27T04:57:53.7621198Z - error[E0017]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7621284Z + error[E0658]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7621573Z 2   --> $DIR/issue-17718-const-bad-values.rs:1:34
2019-11-27T04:57:53.7621623Z 3    |
2019-11-27T04:57:53.7621882Z 4 LL | const C1: &'static mut [usize] = &mut [];
2019-11-27T04:57:53.7621971Z 5    |                                  ^^^^^^^ constants require immutable values
2019-11-27T04:57:53.7622021Z +    |
2019-11-27T04:57:53.7622021Z +    |
2019-11-27T04:57:53.7622732Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7622804Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7622916Z 7 error[E0013]: constants cannot refer to statics, use a constant instead
2019-11-27T04:57:53.7623216Z 8   --> $DIR/issue-17718-const-bad-values.rs:5:46
2019-11-27T04:57:53.7623254Z 
2019-11-27T04:57:53.7623254Z 
2019-11-27T04:57:53.7623529Z 10 LL | const C2: &'static mut usize = unsafe { &mut S };
2019-11-27T04:57:53.7623633Z 12 
2019-11-27T04:57:53.7623914Z - error[E0017]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7623984Z + error[E0658]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7624242Z 14   --> $DIR/issue-17718-const-bad-values.rs:5:41
2019-11-27T04:57:53.7624242Z 14   --> $DIR/issue-17718-const-bad-values.rs:5:41
2019-11-27T04:57:53.7624292Z 15    |
2019-11-27T04:57:53.7624558Z 16 LL | const C2: &'static mut usize = unsafe { &mut S };
2019-11-27T04:57:53.7624647Z 17    |                                         ^^^^^^ constants require immutable values
2019-11-27T04:57:53.7624709Z +    |
2019-11-27T04:57:53.7624709Z +    |
2019-11-27T04:57:53.7625022Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7625095Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7625213Z 19 error: aborting due to 3 previous errors
2019-11-27T04:57:53.7625259Z 20 
2019-11-27T04:57:53.7625286Z 
2019-11-27T04:57:53.7625577Z - Some errors have detailed explanations: E0013, E0017.
2019-11-27T04:57:53.7625577Z - Some errors have detailed explanations: E0013, E0017.
2019-11-27T04:57:53.7625633Z + Some errors have detailed explanations: E0013, E0658.
2019-11-27T04:57:53.7625905Z 22 For more information about an error, try `rustc --explain E0013`.
2019-11-27T04:57:53.7625966Z 23 
2019-11-27T04:57:53.7625994Z 
2019-11-27T04:57:53.7626022Z 
2019-11-27T04:57:53.7626069Z The actual stderr differed from the expected stderr.
2019-11-27T04:57:53.7626448Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-17718-const-bad-values/issue-17718-const-bad-values.stderr
2019-11-27T04:57:53.7626733Z To update references, rerun the tests and pass the `--bless` flag
2019-11-27T04:57:53.7627213Z To only update this specific test, also pass `--test-args issues/issue-17718-const-bad-values.rs`
2019-11-27T04:57:53.7627314Z error: 1 errors occurred comparing output.
2019-11-27T04:57:53.7627371Z status: exit code: 1
2019-11-27T04:57:53.7627371Z status: exit code: 1
2019-11-27T04:57:53.7635655Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-17718-const-bad-values.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-17718-const-bad-values" "-Crpath" "-O" "-Cdebuginfo=0" "-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/ui/issues/issue-17718-const-bad-values/auxiliary" "-A" "unused"
2019-11-27T04:57:53.7636276Z ------------------------------------------
2019-11-27T04:57:53.7636336Z 
2019-11-27T04:57:53.7636593Z ------------------------------------------
2019-11-27T04:57:53.7636662Z stderr:
2019-11-27T04:57:53.7636662Z stderr:
2019-11-27T04:57:53.7636904Z ------------------------------------------
2019-11-27T04:57:53.7637127Z error[E0658]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7637471Z   --> /checkout/src/test/ui/issues/issue-17718-const-bad-values.rs:1:34
2019-11-27T04:57:53.7637547Z    |
2019-11-27T04:57:53.7637799Z LL | const C1: &'static mut [usize] = &mut [];
2019-11-27T04:57:53.7637859Z    |                                  ^^^^^^^ constants require immutable values
2019-11-27T04:57:53.7637924Z    |
2019-11-27T04:57:53.7638278Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7638356Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7638447Z error[E0013]: constants cannot refer to statics, use a constant instead
2019-11-27T04:57:53.7638749Z   --> /checkout/src/test/ui/issues/issue-17718-const-bad-values.rs:5:46
2019-11-27T04:57:53.7638829Z    |
2019-11-27T04:57:53.7638829Z    |
2019-11-27T04:57:53.7639085Z LL | const C2: &'static mut usize = unsafe { &mut S };
2019-11-27T04:57:53.7639195Z 
2019-11-27T04:57:53.7639246Z error[E0658]: references in constants may only refer to immutable values
2019-11-27T04:57:53.7639892Z   --> /checkout/src/test/ui/issues/issue-17718-const-bad-values.rs:5:41
2019-11-27T04:57:53.7639952Z    |
2019-11-27T04:57:53.7639952Z    |
2019-11-27T04:57:53.7640225Z LL | const C2: &'static mut usize = unsafe { &mut S };
2019-11-27T04:57:53.7640285Z    |                                         ^^^^^^ constants require immutable values
2019-11-27T04:57:53.7640335Z    |
2019-11-27T04:57:53.7640677Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7640740Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7640834Z error: aborting due to 3 previous errors
2019-11-27T04:57:53.7640878Z 
2019-11-27T04:57:53.7640926Z Some errors have detailed explanations: E0013, E0658.
2019-11-27T04:57:53.7641221Z For more information about an error, try `rustc --explain E0013`.
---
2019-11-27T04:57:53.7642683Z - error[E0017]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7642775Z + error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7643031Z 2   --> $DIR/issue-46604.rs:1:25
2019-11-27T04:57:53.7643081Z 3    |
2019-11-27T04:57:53.7643143Z 4 LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];
2019-11-27T04:57:53.7643228Z 5    |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values
2019-11-27T04:57:53.7643452Z +    |
2019-11-27T04:57:53.7643452Z +    |
2019-11-27T04:57:53.7643844Z +    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7643919Z +    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7643982Z 6 
2019-11-27T04:57:53.7644035Z 7 error[E0594]: cannot assign to `buf[_]`, as `buf` is an immutable static item
2019-11-27T04:57:53.7648040Z 8   --> $DIR/issue-46604.rs:6:5
2019-11-27T04:57:53.7648636Z 12 
2019-11-27T04:57:53.7648691Z 13 error: aborting due to 2 previous errors
2019-11-27T04:57:53.7665405Z 14 
2019-11-27T04:57:53.7665975Z - Some errors have detailed explanations: E0017, E0594.
---
2019-11-27T04:57:53.7666721Z 
2019-11-27T04:57:53.7666749Z 
2019-11-27T04:57:53.7666813Z The actual stderr differed from the expected stderr.
2019-11-27T04:57:53.7667310Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-46604/issue-46604.stderr
2019-11-27T04:57:53.7667645Z To update references, rerun the tests and pass the `--bless` flag
2019-11-27T04:57:53.7667957Z To only update this specific test, also pass `--test-args issues/issue-46604.rs`
2019-11-27T04:57:53.7668046Z error: 1 errors occurred comparing output.
2019-11-27T04:57:53.7668095Z status: exit code: 1
2019-11-27T04:57:53.7668095Z status: exit code: 1
2019-11-27T04:57:53.7669100Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-46604.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-46604" "-Crpath" "-O" "-Cdebuginfo=0" "-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/ui/issues/issue-46604/auxiliary" "-A" "unused"
2019-11-27T04:57:53.7669517Z ------------------------------------------
2019-11-27T04:57:53.7669556Z 
2019-11-27T04:57:53.7669794Z ------------------------------------------
2019-11-27T04:57:53.7669856Z stderr:
2019-11-27T04:57:53.7669856Z stderr:
2019-11-27T04:57:53.7670091Z ------------------------------------------
2019-11-27T04:57:53.7670149Z error[E0658]: references in statics may only refer to immutable values
2019-11-27T04:57:53.7670422Z   --> /checkout/src/test/ui/issues/issue-46604.rs:1:25
2019-11-27T04:57:53.7670479Z    |
2019-11-27T04:57:53.7670535Z LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //~ ERROR E0017
2019-11-27T04:57:53.7670612Z    |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values
2019-11-27T04:57:53.7670665Z    |
2019-11-27T04:57:53.7671067Z    = note: for more information, see ***/issues/57349
2019-11-27T04:57:53.7671147Z    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-27T04:57:53.7671185Z 
2019-11-27T04:57:53.7671250Z error[E0594]: cannot assign to `buf[_]`, as `buf` is an immutable static item
2019-11-27T04:57:53.7671581Z   --> /checkout/src/test/ui/issues/issue-46604.rs:6:5
2019-11-27T04:57:53.7671637Z    |
2019-11-27T04:57:53.7671691Z LL |     buf[0]=2;                                   //~ ERROR E0594
2019-11-27T04:57:53.7671794Z 
2019-11-27T04:57:53.7671844Z error: aborting due to 2 previous errors
2019-11-27T04:57:53.7671878Z 
2019-11-27T04:57:53.7671929Z Some errors have detailed explanations: E0594, E0658.
---
2019-11-27T04:57:53.7675194Z test result: FAILED. 9249 passed; 5 failed; 43 ignored; 0 measured; 0 filtered out
2019-11-27T04:57:53.7675236Z 
2019-11-27T04:57:53.7677438Z 
2019-11-27T04:57:53.7677488Z 
2019-11-27T04:57:53.7679382Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-27T04:57:53.7679714Z 
2019-11-27T04:57:53.7679744Z 
2019-11-27T04:57:53.7679795Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-27T04:57:53.7679869Z Build completed unsuccessfully in 1:04:36
2019-11-27T04:57:53.7679869Z Build completed unsuccessfully in 1:04:36
2019-11-27T04:57:53.7680214Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-27T04:57:53.7680281Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-27T04:57:53.7680352Z == clock drift check ==
2019-11-27T04:57:53.7680402Z   local time: Wed Nov 27 04:57:53 UTC 2019
2019-11-27T04:57:54.2991671Z   network time: Wed, 27 Nov 2019 04:57:54 GMT
2019-11-27T04:57:54.2995399Z == end clock drift check ==
2019-11-27T04:57:55.1466194Z 
2019-11-27T04:57:55.1574089Z ##[error]Bash exited with code '1'.
2019-11-27T04:57:55.1612190Z ##[section]Starting: Checkout
2019-11-27T04:57:55.1614253Z ==============================================================================
2019-11-27T04:57:55.1614322Z Task         : Get sources
2019-11-27T04:57:55.1614385Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@christianpoveda christianpoveda force-pushed the christianpoveda:mut-refs-in-const-fn branch from debffe6 to b868614 Nov 28, 2019
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 28, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-28T17:21:32.3339713Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-28T17:21:32.3533460Z ##[command]git config gc.auto 0
2019-11-28T17:21:32.3587559Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-28T17:21:32.3644609Z ##[command]git config --get-all http.proxy
2019-11-28T17:21:32.3795844Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66606/merge:refs/remotes/pull/66606/merge
---
2019-11-28T18:19:03.7090739Z .................................................................................................... 1600/9308
2019-11-28T18:19:08.1992766Z .................................................................................................... 1700/9308
2019-11-28T18:19:20.4318635Z ........................................i........................................................... 1800/9308
2019-11-28T18:19:28.1560947Z .................................................................................................... 1900/9308
2019-11-28T18:19:41.4575442Z .........................iiiii...................................................................... 2000/9308
2019-11-28T18:19:51.2708035Z .................................................................................................... 2200/9308
2019-11-28T18:19:53.6801878Z .................................................................................................... 2300/9308
2019-11-28T18:19:58.0762386Z .................................................................................................... 2400/9308
2019-11-28T18:20:19.0664206Z .................................................................................................... 2500/9308
---
2019-11-28T18:22:54.2137357Z ..........................i...............i......................................................... 4800/9308
2019-11-28T18:23:04.2654789Z .................................................................................................... 4900/9308
2019-11-28T18:23:10.0167307Z .................................................................................................... 5000/9308
2019-11-28T18:23:17.7586892Z .................................................................................................... 5100/9308
2019-11-28T18:23:25.1216054Z ...............................ii.ii...........i.................................................... 5200/9308
2019-11-28T18:23:34.1710800Z .................................................................................................... 5400/9308
2019-11-28T18:23:43.9146915Z .................................................................................................... 5500/9308
2019-11-28T18:23:50.8331886Z .............i...................................................................................... 5600/9308
2019-11-28T18:23:56.7452015Z .................................................................................................... 5700/9308
2019-11-28T18:23:56.7452015Z .................................................................................................... 5700/9308
2019-11-28T18:24:07.6006079Z ...................................................................................................i 5800/9308
2019-11-28T18:24:19.4105889Z i...i..ii...........i............................................................................... 5900/9308
2019-11-28T18:24:36.9358889Z .................................................................................................... 6100/9308
2019-11-28T18:24:42.3566202Z .................................................................................................... 6200/9308
2019-11-28T18:24:42.3566202Z .................................................................................................... 6200/9308
2019-11-28T18:24:55.5512197Z ......................i..ii......................................................................... 6300/9308
2019-11-28T18:25:14.7484456Z ..........................................................................................i......... 6500/9308
2019-11-28T18:25:16.8878452Z .................................................................................................... 6600/9308
2019-11-28T18:25:18.9568845Z .................................................................................i.................. 6700/9308
2019-11-28T18:25:21.4688957Z .................................................................................................... 6800/9308
---
2019-11-28T18:29:59.3312328Z failures:
2019-11-28T18:29:59.3318335Z 
2019-11-28T18:29:59.3319310Z ---- [compile-fail] compile-fail/consts/const-fn-error.rs stdout ----
2019-11-28T18:29:59.3319348Z 
2019-11-28T18:29:59.3320169Z error: /checkout/src/test/compile-fail/consts/const-fn-error.rs:7: unexpected error: '7:14: 7:18: references in constant functions may only refer to immutable values [E0658]'
2019-11-28T18:29:59.3321186Z error: /checkout/src/test/compile-fail/consts/const-fn-error.rs:7: expected error not found: E0017
2019-11-28T18:29:59.3321391Z 
2019-11-28T18:29:59.3321550Z error: 1 unexpected errors found, 1 expected errors not found
2019-11-28T18:29:59.3321601Z status: exit code: 1
2019-11-28T18:29:59.3321601Z status: exit code: 1
2019-11-28T18:29:59.3322659Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/consts/const-fn-error.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/consts/const-fn-error" "-Crpath" "-O" "-Cdebuginfo=0" "-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/compile-fail/consts/const-fn-error/auxiliary" "-A" "unused"
2019-11-28T18:29:59.3322951Z unexpected errors (from JSON output): [
2019-11-28T18:29:59.3323170Z         line_num: 7,
2019-11-28T18:29:59.3323241Z         kind: Some(
2019-11-28T18:29:59.3323325Z             Error,
2019-11-28T18:29:59.3323534Z         ),
2019-11-28T18:29:59.3323534Z         ),
2019-11-28T18:29:59.3323602Z         msg: "7:14: 7:18: references in constant functions may only refer to immutable values [E0658]",
2019-11-28T18:29:59.3323994Z ]
2019-11-28T18:29:59.3324043Z 
2019-11-28T18:29:59.3324079Z not found errors (from test file): [
2019-11-28T18:29:59.3324153Z     Error {
---
2019-11-28T18:29:59.3326729Z 
2019-11-28T18:29:59.3329086Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-28T18:29:59.3331357Z 
2019-11-28T18:29:59.3331418Z 
2019-11-28T18:29:59.3333226Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-11-28T18:29:59.3334340Z 
2019-11-28T18:29:59.3334386Z 
2019-11-28T18:29:59.3339024Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-28T18:29:59.3339082Z Build completed unsuccessfully in 1:02:31
2019-11-28T18:29:59.3339082Z Build completed unsuccessfully in 1:02:31
2019-11-28T18:29:59.3391772Z == clock drift check ==
2019-11-28T18:29:59.3407996Z   local time: Thu Nov 28 18:29:59 UTC 2019
2019-11-28T18:29:59.6194981Z   network time: Thu, 28 Nov 2019 18:29:59 GMT
2019-11-28T18:29:59.6199854Z == end clock drift check ==
2019-11-28T18:30:00.4305469Z 
2019-11-28T18:30:00.4411715Z ##[error]Bash exited with code '1'.
2019-11-28T18:30:00.4445687Z ##[section]Starting: Checkout
2019-11-28T18:30:00.4447528Z ==============================================================================
2019-11-28T18:30:00.4447571Z Task         : Get sources
2019-11-28T18:30:00.4447621Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@christianpoveda christianpoveda force-pushed the christianpoveda:mut-refs-in-const-fn branch from 0391700 to b2b9185 Nov 28, 2019
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Nov 28, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, 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.
2019-11-28T19:19:32.8031904Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-28T19:19:32.8226816Z ##[command]git config gc.auto 0
2019-11-28T19:19:33.4311757Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-28T19:19:33.4315833Z ##[command]git config --get-all http.proxy
2019-11-28T19:19:33.4318873Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66606/merge:refs/remotes/pull/66606/merge
---
2019-11-28T20:13:22.7535449Z .................................................................................................... 1600/9309
2019-11-28T20:13:26.8657608Z .................................................................................................... 1700/9309
2019-11-28T20:13:37.7133555Z ........................................i........................................................... 1800/9309
2019-11-28T20:13:44.3875888Z .................................................................................................... 1900/9309
2019-11-28T20:13:56.0305583Z .........................iiiii...................................................................... 2000/9309
2019-11-28T20:14:04.6142776Z .................................................................................................... 2200/9309
2019-11-28T20:14:06.7611268Z .................................................................................................... 2300/9309
2019-11-28T20:14:10.6623086Z .................................................................................................... 2400/9309
2019-11-28T20:14:29.1893947Z .................................................................................................... 2500/9309
---
2019-11-28T20:16:46.7838123Z ..........................i...............i......................................................... 4800/9309
2019-11-28T20:16:55.8667278Z .................................................................................................... 4900/9309
2019-11-28T20:17:01.1196256Z .................................................................................................... 5000/9309
2019-11-28T20:17:08.0961301Z .................................................................................................... 5100/9309
2019-11-28T20:17:14.6021453Z ...............................ii.ii...........i.................................................... 5200/9309
2019-11-28T20:17:22.6627120Z .................................................................................................... 5400/9309
2019-11-28T20:17:31.7702744Z .................................................................................................... 5500/9309
2019-11-28T20:17:38.3052570Z .............i...................................................................................... 5600/9309
2019-11-28T20:17:43.6531502Z .................................................................................................... 5700/9309
2019-11-28T20:17:43.6531502Z .................................................................................................... 5700/9309
2019-11-28T20:17:53.2899072Z ...................................................................................................i 5800/9309
2019-11-28T20:18:03.9388093Z i...i..ii...........i............................................................................... 5900/9309
2019-11-28T20:18:19.3712754Z .................................................................................................... 6100/9309
2019-11-28T20:18:22.5039659Z .................................................................................................... 6200/9309
2019-11-28T20:18:22.5039659Z .................................................................................................... 6200/9309
2019-11-28T20:18:34.3478382Z ......................i..ii......................................................................... 6300/9309
2019-11-28T20:18:51.3454638Z ..........................................................................................i......... 6500/9309
2019-11-28T20:18:53.3150400Z .................................................................................................... 6600/9309
2019-11-28T20:18:55.2312802Z .................................................................................i.................. 6700/9309
2019-11-28T20:18:57.4548752Z .................................................................................................... 6800/9309
---
2019-11-28T20:23:36.1607637Z  finished in 5.374
2019-11-28T20:23:36.1830609Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-11-28T20:23:36.3579035Z 
2019-11-28T20:23:36.3581452Z running 164 tests
2019-11-28T20:23:38.9105393Z iiii....iii......iii..iiii...i.............................i..i..................i....i...........ii 100/164
2019-11-28T20:23:40.5822722Z .i.i..iiii..iiiiiii............i.........iii.i..........ii......
2019-11-28T20:23:40.5824035Z 
2019-11-28T20:23:40.5828258Z  finished in 4.401
2019-11-28T20:23:40.5996653Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-11-28T20:23:40.7534099Z 
---
2019-11-28T20:23:42.4469197Z  finished in 1.847
2019-11-28T20:23:42.4670714Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-11-28T20:23:42.6175311Z 
2019-11-28T20:23:42.6175690Z running 9 tests
2019-11-28T20:23:42.6176819Z iiiiiiiii
2019-11-28T20:23:42.6177191Z 
2019-11-28T20:23:42.6177230Z  finished in 0.150
2019-11-28T20:23:42.6339608Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-11-28T20:23:42.8059543Z 
---
2019-11-28T20:23:59.4293254Z  finished in 16.795
2019-11-28T20:23:59.4490007Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-11-28T20:23:59.6165552Z 
2019-11-28T20:23:59.6166271Z running 124 tests
2019-11-28T20:24:19.7893290Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i....ii...i.......ii 100/124
2019-11-28T20:24:24.0161043Z .i.i.i......iii.i.....ii
2019-11-28T20:24:24.0163336Z 
2019-11-28T20:24:24.0166093Z  finished in 24.567
2019-11-28T20:24:24.0172367Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-11-28T20:24:24.0173328Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-11-28T20:34:27.6791232Z 
2019-11-28T20:34:27.6796824Z    Doc-tests core
2019-11-28T20:34:32.1265727Z 
2019-11-28T20:34:32.1266612Z running 2421 tests
2019-11-28T20:34:41.2231208Z ......iiiii......................................................................................... 100/2421
2019-11-28T20:35:00.4285062Z .................................................................................................... 300/2421
2019-11-28T20:35:10.9230563Z ..i................................................................................................. 400/2421
2019-11-28T20:35:10.9230563Z ..i................................................................................................. 400/2421
2019-11-28T20:35:19.5412400Z ..................................................i..i..................iiii........................ 500/2421
2019-11-28T20:35:36.0615678Z .................................................................................................... 700/2421
2019-11-28T20:35:44.4975432Z .................................................................................................... 800/2421
2019-11-28T20:35:53.0053759Z .................................................................................................... 900/2421
2019-11-28T20:36:01.5566715Z .................................................................................................... 1000/2421
---
2019-11-28T20:39:24.7117669Z ..thread '<unnamed>' panicked at 'test panic in inner thread to poison RwLock', src/libstd/sync/rwlock.rs:768:13
2019-11-28T20:39:24.7126693Z ...thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/rwlock.rs:705:13
2019-11-28T20:39:24.7135388Z thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/rwlock.rs:635:13
2019-11-28T20:39:24.7135974Z thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/rwlock.rs:646:13
2019-11-28T20:39:24.7141170Z ....thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/rwlock.rs:611:13
2019-11-28T20:39:24.7146620Z thread '<unnamed>' panicked at '..explicit panic', src/libstd/sync/rwlock.rs:623:13
2019-11-28T20:39:26.7665585Z .......................thread '<unnamed>' panicked at 'What the answer to my lifetimes dilemma is?', src/libstd/sys_common/remutex.rs:233:13
2019-11-28T20:39:26.7793013Z .............................thread '<unnamed>' panicked at 'explicit panic', src/libstd/thread/mod.rs:1544:13
2019-11-28T20:39:27.3856281Z .............thread '<unnamed>' panicked at 'Box<Any>', src/libstd/thread/mod.rs:1676:13
2019-11-28T20:39:27.3856638Z thread '<unnamed>' panicked at 'owned string', src/libstd/thread/mod.rs:1662:13
2019-11-28T20:39:27.3856867Z thread '<unnamed>' panicked at 'static string', src/libstd/thread/mod.rs:1648:13
---
2019-11-28T20:39:33.8382668Z 
2019-11-28T20:39:33.8399489Z running 999 tests
2019-11-28T20:39:50.4479559Z i................................................................................................... 100/999
2019-11-28T20:40:00.0716568Z .................................................................................................... 200/999
2019-11-28T20:40:06.8723928Z ..................iii......i......i...i......i...................................................... 300/999
2019-11-28T20:40:11.4305687Z .................................................................................................... 400/999
2019-11-28T20:40:18.2167978Z ..........................................i..i.................................ii................... 500/999
2019-11-28T20:40:30.8158019Z .................................................................................................... 700/999
2019-11-28T20:40:30.8158019Z .................................................................................................... 700/999
2019-11-28T20:40:37.2192036Z .........................iiii....................................................................... 800/999
2019-11-28T20:40:50.0546859Z .................................................................................................... 900/999
2019-11-28T20:40:56.2413012Z ...............................................iiii................................................
2019-11-28T20:40:56.2413883Z 
2019-11-28T20:40:56.2466221Z  finished in 164.961
2019-11-28T20:40:56.2478635Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-11-28T20:40:56.4302248Z    Compiling term v0.0.0 (/checkout/src/libterm)
---
2019-11-28T20:56:21.2814939Z ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0017 (line 304) stdout ----
2019-11-28T20:56:21.2815001Z error[E0658]: references in constants may only refer to immutable values
2019-11-28T20:56:21.2815224Z  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:309:22
2019-11-28T20:56:21.2815267Z   |
2019-11-28T20:56:21.2815312Z 7 | const CR: &mut i32 = &mut C;
2019-11-28T20:56:21.2815354Z   |                      ^^^^^^ constants require immutable values
2019-11-28T20:56:21.2815390Z   |
2019-11-28T20:56:21.2815738Z   = note: for more information, see ***/issues/57349
2019-11-28T20:56:21.2815790Z   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-28T20:56:21.2815866Z error[E0658]: references in statics may only refer to immutable values
2019-11-28T20:56:21.2816110Z  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:310:39
2019-11-28T20:56:21.2816157Z   |
2019-11-28T20:56:21.2816364Z 8 | static STATIC_REF: &'static mut i32 = &mut X;
2019-11-28T20:56:21.2816364Z 8 | static STATIC_REF: &'static mut i32 = &mut X;
2019-11-28T20:56:21.2816412Z   |                                       ^^^^^^ statics require immutable values
2019-11-28T20:56:21.2816449Z   |
2019-11-28T20:56:21.2816699Z   = note: for more information, see ***/issues/57349
2019-11-28T20:56:21.2816748Z   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-28T20:56:21.2816820Z error[E0596]: cannot borrow immutable static item `X` as mutable
2019-11-28T20:56:21.2817047Z  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:310:39
2019-11-28T20:56:21.2817088Z   |
2019-11-28T20:56:21.2817277Z 8 | static STATIC_REF: &'static mut i32 = &mut X;
---
2019-11-28T20:56:21.2817823Z   |
2019-11-28T20:56:21.2818011Z 9 | static CONST_REF: &'static mut i32 = &mut C;
2019-11-28T20:56:21.2818067Z   |                                      ^^^^^^ statics require immutable values
2019-11-28T20:56:21.2818103Z   |
2019-11-28T20:56:21.2818349Z   = note: for more information, see ***/issues/57349
2019-11-28T20:56:21.2818404Z   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
2019-11-28T20:56:21.2818467Z error: aborting due to 4 previous errors
2019-11-28T20:56:21.2818492Z 
2019-11-28T20:56:21.2818535Z Some errors have detailed explanations: E0596, E0658.
2019-11-28T20:56:21.2818754Z For more information about an error, try `rustc --explain E0596`.
2019-11-28T20:56:21.2818754Z For more information about an error, try `rustc --explain E0596`.
2019-11-28T20:56:21.2818800Z Some expected error codes were not found: ["E0017"]
2019-11-28T20:56:21.2818878Z failures:
2019-11-28T20:56:21.2819129Z     /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0017 (line 304)
2019-11-28T20:56:21.2819161Z 
2019-11-28T20:56:21.2819209Z test result: FAILED. 793 passed; 1 failed; 28 ignored; 0 measured; 0 filtered out
---
2019-11-28T20:56:21.2823441Z   local time: Thu Nov 28 20:56:21 UTC 2019
2019-11-28T20:56:21.7875496Z   network time: Thu, 28 Nov 2019 20:56:21 GMT
2019-11-28T20:56:21.7877734Z == end clock drift check ==
2019-11-28T20:56:22.4494441Z 
2019-11-28T20:56:22.4579498Z ##[error]Bash exited with code '1'.
2019-11-28T20:56:22.4619183Z ##[section]Starting: Checkout
2019-11-28T20:56:22.4621960Z ==============================================================================
2019-11-28T20:56:22.4622025Z Task         : Get sources
2019-11-28T20:56:22.4622079Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@christianpoveda christianpoveda force-pushed the christianpoveda:mut-refs-in-const-fn branch from 5d1d0fb to e01ad6a Dec 2, 2019
@oli-obk

This comment has been minimized.

Copy link
Contributor

oli-obk commented Dec 6, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 6, 2019

📌 Commit e01ad6a has been approved by oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 6, 2019

⌛️ Testing commit e01ad6a with merge 4e66dc6...

bors added a commit that referenced this pull request Dec 6, 2019
Add feature gate for mut refs in const fn

r? @oli-obk
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 6, 2019

☀️ Test successful - checks-azure
Approved by: oli-obk
Pushing 4e66dc6 to master...

@bors bors added the merged-by-bors label Dec 6, 2019
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 6, 2019

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Dec 6, 2019

@bors retry

Centril added a commit to Centril/rust that referenced this pull request Dec 6, 2019
…n, r=oli-obk

Add feature gate for mut refs in const fn

r? @oli-obk
bors added a commit that referenced this pull request Dec 6, 2019
Rollup of 10 pull requests

Successful merges:

 - #66606 (Add feature gate for mut refs in const fn)
 - #66841 (Add `{f32,f64}::approx_unchecked_to<Int>` unsafe methods)
 - #67009 (Emit coercion suggestions in more places)
 - #67052 (Ditch `parse_in_attr`)
 - #67071 (Do not ICE on closure typeck)
 - #67078 (accept union inside enum if not followed by identifier)
 - #67090 (Change "either" to "any" in Layout::from_size_align's docs)
 - #67092 (Fix comment typos in src/libcore/alloc.rs)
 - #67094 (get rid of __ in field names)
 - #67102 (Add note to src/ci/docker/README.md about multiple docker images)

Failed merges:

 - #67101 (use `#[allow(unused_attributes)]` to paper over incr.comp problem)

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 7, 2019

⌛️ Testing commit e01ad6a with merge 41601a8...

@bors bors merged commit e01ad6a into rust-lang:master Dec 7, 2019
4 of 5 checks passed
4 of 5 checks passed
homu Testing commit e01ad6a01abce35f59543bf38a280a05eb7f6929 with merge 41601a8c95240cada94c13466a1fea02e5fe87ed...
Details
pr #20191202.31 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
tanriol added a commit to tanriol/this-week-in-rust that referenced this pull request Dec 12, 2019
nasa42 added a commit to emberian/this-week-in-rust that referenced this pull request Dec 13, 2019
fix link to rust-lang/rust#66606
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.