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

more specific errors in src/librustc/mir/interpret/error.rs #60951

Merged
merged 4 commits into from
Jul 23, 2019

Conversation

saleemjaffer
Copy link
Contributor

@saleemjaffer saleemjaffer commented May 19, 2019

Implements this

@rust-highfive
Copy link
Collaborator

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 19, 2019
@saleemjaffer
Copy link
Contributor Author

r? @oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned estebank May 19, 2019
@saleemjaffer
Copy link
Contributor Author

@oli-obk I have just copy pasted the enum specified in the RFC, so that we can discuss how to do stuff over here.

@rust-highfive
Copy link
Collaborator

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

Click to expand the log.
travis_time:end:04844e10:start=1558236819886650896,finish=1558236820629847964,duration=743197068
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:08:48]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:08:55] error[E0412]: cannot find type `FnSig` in this scope
[00:08:55]   --> src/librustc/mir/interpret/error.rs:26:31
[00:08:55]    |
[00:08:55] 26 |     FunctionPointerTyMismatch(FnSig<'tcx>, FnSig<'tcx>),
[00:08:55] help: possible candidate is found in another module, you can import it into scope
[00:08:55]    |
[00:08:55]    |
[00:08:55] 1  | use crate::ty::sty::FnSig;
[00:08:55] 
[00:08:55] error[E0412]: cannot find type `FnSig` in this scope
[00:08:55]   --> src/librustc/mir/interpret/error.rs:26:44
[00:08:55]    |
[00:08:55]    |
[00:08:55] 26 |     FunctionPointerTyMismatch(FnSig<'tcx>, FnSig<'tcx>),
[00:08:55] help: possible candidate is found in another module, you can import it into scope
[00:08:55]    |
[00:08:55]    |
[00:08:55] 1  | use crate::ty::sty::FnSig;
[00:08:55] 
[00:08:56] error[E0412]: cannot find type `AccessKind` in this scope
[00:08:56]   --> src/librustc/mir/interpret/error.rs:65:17
[00:08:56]    |
---
[00:08:56]    |
[00:08:56] 1  | use rustc_data_structures::sync::Lock;
[00:08:56]    |
[00:08:56] 
[00:08:56] error[E0412]: cannot find type `Lrc` in this scope
[00:08:56]    --> src/librustc/mir/interpret/error.rs:111:24
[00:08:56]     |
[00:08:56] 111 |     ReferencedConstant(Lrc<ConstEvalErr<'tcx>>),
[00:08:56] help: possible candidate is found in another module, you can import it into scope
[00:08:56]     |
[00:08:56] 1   | use rustc_data_structures::sync::Lrc;
[00:08:56]     |
[00:08:56]     |
[00:08:56] 
[00:08:57] error: hidden lifetime parameters in types are deprecated
[00:08:57]    --> src/librustc/mir/interpret/error.rs:100:11
[00:08:57]     |
[00:08:57] 100 |     Panic(EvalErrorPanic),
[00:08:57] 
[00:09:00] error[E0106]: missing lifetime specifier
[00:09:00]    --> src/librustc/mir/interpret/error.rs:100:11
[00:09:00]     |
[00:09:00]     |
[00:09:00] 100 |     Panic(EvalErrorPanic),
[00:09:00] 
[00:09:00] error[E0107]: wrong number of type arguments: expected 1, found 0
[00:09:00]    --> src/librustc/mir/interpret/error.rs:100:11
[00:09:00]     |
[00:09:00]     |
[00:09:00] 100 |     Panic(EvalErrorPanic),
[00:09:00] 
[00:09:01] error: aborting due to 12 previous errors
[00:09:01] 
[00:09:01] Some errors occurred: E0106, E0107, E0412.
---
19256 ./src/llvm-project/lldb/www/cpp_reference
19252 ./src/llvm-project/lldb/www/cpp_reference/html
17940 ./src/llvm-project/lldb/www/python_reference
17148 ./obj/build/x86_64-unknown-linux-gnu/stage0-std/release/build
travis_time:end:022e862e:start=1558237386506370987,finish=1558237387056180016,dur$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:13c43f8a
$ dmesg | grep -i kill

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

@oli-obk
Copy link
Contributor

oli-obk commented May 19, 2019

The current error enum is defined in https://github.com/rust-lang/rust/blob/b4aba66b0577bcd2228afd01421b136c72965b28/src/librustc/mir/interpret/error.rs#L334

You should not copy the one from the RFC issue, but modify the current one, as there may have been significant changes. The RFC issue only serves as a guideline on what to do

@Dylan-DPC-zz
Copy link

ping from triage @saleemjaffer any updates?

@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2019
@saleemjaffer
Copy link
Contributor Author

@Dylan-DPC I was occupied with something over the last two weeks. I can pick this up again in a while.

@Dylan-DPC-zz
Copy link

ping from triage @saleemjaffer
Unfortunately we haven't heard from you on this in a while, so I'm closing the PR to keep things tidy. Don't worry though, if you'll have time again in the future please reopen this PR, we'll be happy to review it again! Thanks

@Dylan-DPC-zz Dylan-DPC-zz added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 24, 2019
@saleemjaffer
Copy link
Contributor Author

@oli-obk @Dylan-DPC I can work on this now :)

@saleemjaffer
Copy link
Contributor Author

@oli-obk Don't know why does it say that I have closed the PR. Could you reopen it?

I have tried doing some refactor, but it does not show up on this PR. Github asks me to open a new PR.

@eddyb eddyb reopened this Jul 18, 2019
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (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-07-18T10:12:13.0087986Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-18T10:12:13.0269541Z ##[command]git config gc.auto 0
2019-07-18T10:12:13.0335920Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-18T10:12:13.0387017Z ##[command]git config --get-all http.proxy
2019-07-18T10:12:13.0532468Z ##[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/60951/merge:refs/remotes/pull/60951/merge
---
2019-07-18T10:12:48.3363425Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-18T10:12:48.3363454Z 
2019-07-18T10:12:48.3363682Z   git checkout -b <new-branch-name>
2019-07-18T10:12:48.3363710Z 
2019-07-18T10:12:48.3363757Z HEAD is now at 28590e917 Merge 589f6a7dc66d88739485a1f9044ab29c166420a0 into 2c3b05d90d4dee879a0d9f33e721c930b087d7d1
2019-07-18T10:12:48.3498603Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-18T10:12:48.3501056Z ==============================================================================
2019-07-18T10:12:48.3501100Z Task         : Bash
2019-07-18T10:12:48.3501153Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-18T10:20:06.1123210Z     Checking syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
2019-07-18T10:20:07.3887164Z     Checking rustc_errors v0.0.0 (/checkout/src/librustc_errors)
2019-07-18T10:20:08.4994844Z     Checking fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2019-07-18T10:20:19.9285186Z     Checking syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
2019-07-18T10:20:23.2089775Z error[E0412]: cannot find type `FnSig` in this scope
2019-07-18T10:20:23.2090156Z    --> src/librustc/mir/interpret/error.rs:250:31
2019-07-18T10:20:23.2090477Z     |
2019-07-18T10:20:23.2097115Z 250 |     FunctionPointerTyMismatch(FnSig<'tcx>, FnSig<'tcx>),
2019-07-18T10:20:23.2098558Z help: possible candidate is found in another module, you can import it into scope
2019-07-18T10:20:23.2099022Z     |
2019-07-18T10:20:23.2099022Z     |
2019-07-18T10:20:23.2099533Z 1   | use crate::ty::sty::FnSig;
2019-07-18T10:20:23.2100172Z 
2019-07-18T10:20:23.2100172Z 
2019-07-18T10:20:23.2187554Z error[E0412]: cannot find type `FnSig` in this scope
2019-07-18T10:20:23.2188123Z    --> src/librustc/mir/interpret/error.rs:250:44
2019-07-18T10:20:23.2188445Z     |
2019-07-18T10:20:23.2188760Z 250 |     FunctionPointerTyMismatch(FnSig<'tcx>, FnSig<'tcx>),
2019-07-18T10:20:23.2189449Z help: possible candidate is found in another module, you can import it into scope
2019-07-18T10:20:23.2189709Z     |
2019-07-18T10:20:23.2189709Z     |
2019-07-18T10:20:23.2190042Z 1   | use crate::ty::sty::FnSig;
2019-07-18T10:20:23.2190317Z 
2019-07-18T10:20:23.2190317Z 
2019-07-18T10:20:23.2278745Z error[E0412]: cannot find type `AccessKind` in this scope
2019-07-18T10:20:23.2279103Z    --> src/librustc/mir/interpret/error.rs:291:17
2019-07-18T10:20:23.2279333Z     |
2019-07-18T10:20:23.2279625Z 291 |         access: AccessKind,
2019-07-18T10:20:23.2279999Z 
2019-07-18T10:20:23.2279999Z 
2019-07-18T10:20:23.2375128Z error[E0412]: cannot find type `Lock` in this scope
2019-07-18T10:20:23.2375424Z    --> src/librustc/mir/interpret/error.rs:292:15
2019-07-18T10:20:23.2376218Z 292 |         lock: Lock,
2019-07-18T10:20:23.2402097Z     |               ^^^^ not found in this scope
2019-07-18T10:20:23.2402097Z     |               ^^^^ not found in this scope
2019-07-18T10:20:23.2402405Z help: possible candidates are found in other modules, you can import them into scope
2019-07-18T10:20:23.2403079Z 1   | use rustc_data_structures::flock::Lock;
2019-07-18T10:20:23.2403281Z     |
2019-07-18T10:20:23.2403541Z 1   | use rustc_data_structures::sync::Lock;
2019-07-18T10:20:23.2403750Z     |
2019-07-18T10:20:23.2403750Z     |
2019-07-18T10:20:23.2403782Z 
2019-07-18T10:20:23.2474614Z error[E0412]: cannot find type `AccessKind` in this scope
2019-07-18T10:20:23.2475124Z    --> src/librustc/mir/interpret/error.rs:297:15
2019-07-18T10:20:23.2475330Z     |
2019-07-18T10:20:23.2475595Z 297 |         kind: AccessKind,
2019-07-18T10:20:23.2475957Z 
2019-07-18T10:20:23.2475957Z 
2019-07-18T10:20:23.2568563Z error[E0412]: cannot find type `Lock` in this scope
2019-07-18T10:20:23.2568927Z    --> src/librustc/mir/interpret/error.rs:298:15
2019-07-18T10:20:23.2569520Z 298 |         lock: Lock,
2019-07-18T10:20:23.2569902Z     |               ^^^^ not found in this scope
2019-07-18T10:20:23.2569902Z     |               ^^^^ not found in this scope
2019-07-18T10:20:23.2570267Z help: possible candidates are found in other modules, you can import them into scope
2019-07-18T10:20:23.2571375Z 1   | use rustc_data_structures::flock::Lock;
2019-07-18T10:20:23.2571604Z     |
2019-07-18T10:20:23.2571856Z 1   | use rustc_data_structures::sync::Lock;
2019-07-18T10:20:23.2572061Z     |
2019-07-18T10:20:23.2572061Z     |
2019-07-18T10:20:23.2572108Z 
2019-07-18T10:20:23.2665428Z error[E0412]: cannot find type `Lock` in this scope
2019-07-18T10:20:23.2665948Z    --> src/librustc/mir/interpret/error.rs:304:15
2019-07-18T10:20:23.2666496Z 304 |         lock: Lock,
2019-07-18T10:20:23.2666795Z     |               ^^^^ not found in this scope
2019-07-18T10:20:23.2666795Z     |               ^^^^ not found in this scope
2019-07-18T10:20:23.2667117Z help: possible candidates are found in other modules, you can import them into scope
2019-07-18T10:20:23.2668831Z 1   | use rustc_data_structures::flock::Lock;
2019-07-18T10:20:23.2669108Z     |
2019-07-18T10:20:23.2669415Z 1   | use rustc_data_structures::sync::Lock;
2019-07-18T10:20:23.2669660Z     |
2019-07-18T10:20:23.2669660Z     |
2019-07-18T10:20:23.2669717Z 
2019-07-18T10:20:23.2773438Z error[E0412]: cannot find type `Lock` in this scope
2019-07-18T10:20:23.2773902Z    --> src/librustc/mir/interpret/error.rs:308:15
2019-07-18T10:20:23.2774354Z 308 |         lock: Lock,
2019-07-18T10:20:23.2774802Z     |               ^^^^ not found in this scope
2019-07-18T10:20:23.2774802Z     |               ^^^^ not found in this scope
2019-07-18T10:20:23.2775075Z help: possible candidates are found in other modules, you can import them into scope
2019-07-18T10:20:23.2775503Z 1   | use rustc_data_structures::flock::Lock;
2019-07-18T10:20:23.2775709Z     |
2019-07-18T10:20:23.2775944Z 1   | use rustc_data_structures::sync::Lock;
2019-07-18T10:20:23.2776139Z     |
2019-07-18T10:20:23.2776139Z     |
2019-07-18T10:20:23.2776184Z 
2019-07-18T10:20:24.0419164Z error: unused import: `syntax::symbol::Symbol`
2019-07-18T10:20:24.0419567Z   --> src/librustc/mir/interpret/error.rs:19:5
2019-07-18T10:20:24.0419837Z    |
2019-07-18T10:20:24.0420109Z 19 | use syntax::symbol::Symbol;
2019-07-18T10:20:24.0420379Z    |     ^^^^^^^^^^^^^^^^^^^^^^
2019-07-18T10:20:24.0420613Z    |
2019-07-18T10:20:24.0421039Z    = note: `-D unused-imports` implied by `-D warnings`
2019-07-18T10:20:24.0421079Z 
2019-07-18T10:20:25.1634833Z error: lifetime parameter `'tcx` never used
2019-07-18T10:20:25.1635405Z    --> src/librustc/mir/interpret/error.rs:344:25
2019-07-18T10:20:25.1635574Z     |
2019-07-18T10:20:25.1635779Z 344 | pub enum EvalErrorPanic<'tcx, O> {
2019-07-18T10:20:25.1636251Z     |                         ^^^^--
2019-07-18T10:20:25.1636516Z     |                         |
2019-07-18T10:20:25.1636765Z     |                         help: elide the unused lifetime
2019-07-18T10:20:25.1637104Z note: lint level defined here
2019-07-18T10:20:25.1637285Z    --> src/librustc/lib.rs:32:9
2019-07-18T10:20:25.1637773Z     |
2019-07-18T10:20:25.1637773Z     |
2019-07-18T10:20:25.1638042Z 32  | #![deny(unused_lifetimes)]
2019-07-18T10:20:25.1638365Z 
2019-07-18T10:20:25.5852749Z error: aborting due to 10 previous errors
2019-07-18T10:20:25.5852840Z 
2019-07-18T10:20:25.5853084Z For more information about this error, try `rustc --explain E0412`.
2019-07-18T10:20:25.5853084Z For more information about this error, try `rustc --explain E0412`.
2019-07-18T10:20:25.7241238Z error: Could not compile `rustc`.
2019-07-18T10:20:25.7241336Z 
2019-07-18T10:20:25.7241556Z To learn more, run the command again with --verbose.
2019-07-18T10:20:25.7268117Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-j" "2" "--release" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
2019-07-18T10:20:25.7278656Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
2019-07-18T10:20:25.7278728Z Build completed unsuccessfully in 0:04:29
2019-07-18T10:20:25.7278728Z Build completed unsuccessfully in 0:04:29
2019-07-18T10:20:26.9188269Z ##[error]Bash exited with code '1'.
2019-07-18T10:20:26.9216617Z ##[section]Starting: Checkout
2019-07-18T10:20:26.9218441Z ==============================================================================
2019-07-18T10:20:26.9218498Z Task         : Get sources
2019-07-18T10:20:26.9218547Z 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
Copy link
Collaborator

The job mingw-check of your PR failed (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-07-18T10:12:14.3535416Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-18T10:12:14.3733242Z ##[command]git config gc.auto 0
2019-07-18T10:12:14.3821425Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-18T10:12:14.3874505Z ##[command]git config --get-all http.proxy
2019-07-18T10:12:14.4017512Z ##[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/60951/merge:refs/remotes/pull/60951/merge
---
2019-07-18T10:12:49.2456190Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-18T10:12:49.2457890Z 
2019-07-18T10:12:49.2458797Z   git checkout -b <new-branch-name>
2019-07-18T10:12:49.2458867Z 
2019-07-18T10:12:49.2458952Z HEAD is now at 28590e917 Merge 589f6a7dc66d88739485a1f9044ab29c166420a0 into 2c3b05d90d4dee879a0d9f33e721c930b087d7d1
2019-07-18T10:12:49.2607094Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-18T10:12:49.2610688Z ==============================================================================
2019-07-18T10:12:49.2610800Z Task         : Bash
2019-07-18T10:12:49.2610855Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-18T10:20:40.4498512Z     Checking syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
2019-07-18T10:20:42.0285178Z     Checking rustc_errors v0.0.0 (/checkout/src/librustc_errors)
2019-07-18T10:20:43.3643614Z     Checking fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2019-07-18T10:20:57.0643450Z     Checking syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
2019-07-18T10:21:01.1232478Z error[E0412]: cannot find type `FnSig` in this scope
2019-07-18T10:21:01.1234119Z    --> src/librustc/mir/interpret/error.rs:250:31
2019-07-18T10:21:01.1234836Z     |
2019-07-18T10:21:01.1235619Z 250 |     FunctionPointerTyMismatch(FnSig<'tcx>, FnSig<'tcx>),
2019-07-18T10:21:01.1237194Z help: possible candidate is found in another module, you can import it into scope
2019-07-18T10:21:01.1237847Z     |
2019-07-18T10:21:01.1237847Z     |
2019-07-18T10:21:01.1238620Z 1   | use crate::ty::sty::FnSig;
2019-07-18T10:21:01.1239590Z 
2019-07-18T10:21:01.1239590Z 
2019-07-18T10:21:01.1367208Z error[E0412]: cannot find type `FnSig` in this scope
2019-07-18T10:21:01.1368955Z    --> src/librustc/mir/interpret/error.rs:250:44
2019-07-18T10:21:01.1370361Z     |
2019-07-18T10:21:01.1371231Z 250 |     FunctionPointerTyMismatch(FnSig<'tcx>, FnSig<'tcx>),
2019-07-18T10:21:01.1373048Z help: possible candidate is found in another module, you can import it into scope
2019-07-18T10:21:01.1373577Z     |
2019-07-18T10:21:01.1373577Z     |
2019-07-18T10:21:01.1374122Z 1   | use crate::ty::sty::FnSig;
2019-07-18T10:21:01.1375026Z 
2019-07-18T10:21:01.1375026Z 
2019-07-18T10:21:01.1493838Z error[E0412]: cannot find type `AccessKind` in this scope
2019-07-18T10:21:01.1494624Z    --> src/librustc/mir/interpret/error.rs:291:17
2019-07-18T10:21:01.1495153Z     |
2019-07-18T10:21:01.1495636Z 291 |         access: AccessKind,
2019-07-18T10:21:01.1496431Z 
2019-07-18T10:21:01.1496431Z 
2019-07-18T10:21:01.1642214Z error[E0412]: cannot find type `Lock` in this scope
2019-07-18T10:21:01.1643136Z    --> src/librustc/mir/interpret/error.rs:292:15
2019-07-18T10:21:01.1644171Z 292 |         lock: Lock,
2019-07-18T10:21:01.1644840Z     |               ^^^^ not found in this scope
2019-07-18T10:21:01.1644840Z     |               ^^^^ not found in this scope
2019-07-18T10:21:01.1645399Z help: possible candidates are found in other modules, you can import them into scope
2019-07-18T10:21:01.1646454Z 1   | use rustc_data_structures::flock::Lock;
2019-07-18T10:21:01.1646938Z     |
2019-07-18T10:21:01.1647515Z 1   | use rustc_data_structures::sync::Lock;
2019-07-18T10:21:01.1647987Z     |
2019-07-18T10:21:01.1647987Z     |
2019-07-18T10:21:01.1648182Z 
2019-07-18T10:21:01.1782014Z error[E0412]: cannot find type `AccessKind` in this scope
2019-07-18T10:21:01.1782855Z    --> src/librustc/mir/interpret/error.rs:297:15
2019-07-18T10:21:01.1783472Z     |
2019-07-18T10:21:01.1784025Z 297 |         kind: AccessKind,
2019-07-18T10:21:01.1784913Z 
2019-07-18T10:21:01.1784913Z 
2019-07-18T10:21:01.1929723Z error[E0412]: cannot find type `Lock` in this scope
2019-07-18T10:21:01.1930859Z    --> src/librustc/mir/interpret/error.rs:298:15
2019-07-18T10:21:01.1931979Z 298 |         lock: Lock,
2019-07-18T10:21:01.1932596Z     |               ^^^^ not found in this scope
2019-07-18T10:21:01.1932596Z     |               ^^^^ not found in this scope
2019-07-18T10:21:01.1933197Z help: possible candidates are found in other modules, you can import them into scope
2019-07-18T10:21:01.1934311Z 1   | use rustc_data_structures::flock::Lock;
2019-07-18T10:21:01.1934820Z     |
2019-07-18T10:21:01.1935374Z 1   | use rustc_data_structures::sync::Lock;
2019-07-18T10:21:01.1936154Z     |
2019-07-18T10:21:01.1936154Z     |
2019-07-18T10:21:01.1936965Z 
2019-07-18T10:21:01.2064355Z error[E0412]: cannot find type `Lock` in this scope
2019-07-18T10:21:01.2064844Z    --> src/librustc/mir/interpret/error.rs:304:15
2019-07-18T10:21:01.2068923Z 304 |         lock: Lock,
2019-07-18T10:21:01.2070413Z     |               ^^^^ not found in this scope
2019-07-18T10:21:01.2070413Z     |               ^^^^ not found in this scope
2019-07-18T10:21:01.2071143Z help: possible candidates are found in other modules, you can import them into scope
2019-07-18T10:21:01.2072520Z 1   | use rustc_data_structures::flock::Lock;
2019-07-18T10:21:01.2073144Z     |
2019-07-18T10:21:01.2073871Z 1   | use rustc_data_structures::sync::Lock;
2019-07-18T10:21:01.2074474Z     |
2019-07-18T10:21:01.2074474Z     |
2019-07-18T10:21:01.2074774Z 
2019-07-18T10:21:01.2216015Z error[E0412]: cannot find type `Lock` in this scope
2019-07-18T10:21:01.2216417Z    --> src/librustc/mir/interpret/error.rs:308:15
2019-07-18T10:21:01.2216998Z 308 |         lock: Lock,
2019-07-18T10:21:01.2217324Z     |               ^^^^ not found in this scope
2019-07-18T10:21:01.2217324Z     |               ^^^^ not found in this scope
2019-07-18T10:21:01.2217642Z help: possible candidates are found in other modules, you can import them into scope
2019-07-18T10:21:01.2218172Z 1   | use rustc_data_structures::flock::Lock;
2019-07-18T10:21:01.2218950Z     |
2019-07-18T10:21:01.2219264Z 1   | use rustc_data_structures::sync::Lock;
2019-07-18T10:21:01.2219496Z     |
2019-07-18T10:21:01.2219496Z     |
2019-07-18T10:21:01.2219550Z 
2019-07-18T10:21:02.1208192Z error: unused import: `syntax::symbol::Symbol`
2019-07-18T10:21:02.1208645Z   --> src/librustc/mir/interpret/error.rs:19:5
2019-07-18T10:21:02.1209517Z    |
2019-07-18T10:21:02.1209882Z 19 | use syntax::symbol::Symbol;
2019-07-18T10:21:02.1210205Z    |     ^^^^^^^^^^^^^^^^^^^^^^
2019-07-18T10:21:02.1210532Z    |
2019-07-18T10:21:02.1210877Z    = note: `-D unused-imports` implied by `-D warnings`
2019-07-18T10:21:02.1210932Z 
2019-07-18T10:21:03.4631357Z error: lifetime parameter `'tcx` never used
2019-07-18T10:21:03.4631875Z    --> src/librustc/mir/interpret/error.rs:344:25
2019-07-18T10:21:03.4632151Z     |
2019-07-18T10:21:03.4632525Z 344 | pub enum EvalErrorPanic<'tcx, O> {
2019-07-18T10:21:03.4632906Z     |                         ^^^^--
2019-07-18T10:21:03.4633243Z     |                         |
2019-07-18T10:21:03.4633631Z     |                         help: elide the unused lifetime
2019-07-18T10:21:03.4634438Z note: lint level defined here
2019-07-18T10:21:03.4634735Z    --> src/librustc/lib.rs:32:9
2019-07-18T10:21:03.4635022Z     |
2019-07-18T10:21:03.4635022Z     |
2019-07-18T10:21:03.4635339Z 32  | #![deny(unused_lifetimes)]
2019-07-18T10:21:03.4635887Z 
2019-07-18T10:21:03.9823108Z error: aborting due to 10 previous errors
2019-07-18T10:21:03.9823233Z 
2019-07-18T10:21:03.9823580Z For more information about this error, try `rustc --explain E0412`.
2019-07-18T10:21:03.9823580Z For more information about this error, try `rustc --explain E0412`.
2019-07-18T10:21:04.1470923Z error: Could not compile `rustc`.
2019-07-18T10:21:04.1471659Z 
2019-07-18T10:21:04.1472548Z To learn more, run the command again with --verbose.
2019-07-18T10:21:04.1503437Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-j" "2" "--release" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
2019-07-18T10:21:04.1508639Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
2019-07-18T10:21:04.1508726Z Build completed unsuccessfully in 0:05:03
2019-07-18T10:21:04.1508726Z Build completed unsuccessfully in 0:05:03
2019-07-18T10:21:05.2986276Z ##[error]Bash exited with code '1'.
2019-07-18T10:21:05.3031415Z ##[section]Starting: Checkout
2019-07-18T10:21:05.3033316Z ==============================================================================
2019-07-18T10:21:05.3033400Z Task         : Get sources
2019-07-18T10:21:05.3033456Z 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)

@saleemjaffer
Copy link
Contributor Author

@oli-obk I have tried to start off by changing the enum fields as per the RFC. How do I proceed now?

Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

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

The next steps would be to make all uses of the moved variants compile again.

@@ -281,6 +284,29 @@ pub enum InterpError<'tcx, O> {
required: Align,
has: Align,
},
MemoryLockViolation {
Copy link
Contributor

Choose a reason for hiding this comment

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

these suddenly showed up in this PR

@@ -247,6 +247,7 @@ pub enum InterpError<'tcx, O> {
DanglingPointerDeref,
DoubleFree,
InvalidMemoryAccess,
FunctionPointerTyMismatch(FnSig<'tcx>, FnSig<'tcx>),
Copy link
Contributor

Choose a reason for hiding this comment

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

this wasn't here before this PR, maybe a rebase gone wrong?

@@ -319,6 +340,16 @@ pub enum InterpError<'tcx, O> {
InfiniteLoop,
}

#[derive(Clone, RustcEncodable, RustcDecodable)]
pub enum EvalErrorPanic<'tcx, O> {
Panic,
Copy link
Contributor

Choose a reason for hiding this comment

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

this needs the fields of the old Panic variant from above.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (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-07-20T06:19:06.6282788Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-20T06:19:06.6459682Z ##[command]git config gc.auto 0
2019-07-20T06:19:06.6530979Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-20T06:19:06.6596007Z ##[command]git config --get-all http.proxy
2019-07-20T06:19:06.6732060Z ##[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/60951/merge:refs/remotes/pull/60951/merge
---
2019-07-20T06:19:40.7953895Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-20T06:19:40.7953944Z 
2019-07-20T06:19:40.7954177Z   git checkout -b <new-branch-name>
2019-07-20T06:19:40.7954209Z 
2019-07-20T06:19:40.7954257Z HEAD is now at 1c20e99e9 Merge fd352b02e17d78f03345ebc3ffabe02b0cb04fd1 into e9d22273283dce210b26362aa0dcc3fc10bf7e81
2019-07-20T06:19:40.8086948Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-20T06:19:40.8089549Z ==============================================================================
2019-07-20T06:19:40.8089599Z Task         : Bash
2019-07-20T06:19:40.8089638Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-20T07:17:35.0404645Z .................................................................................................... 200/5839
2019-07-20T07:17:39.2516606Z .................................................................................................... 300/5839
2019-07-20T07:17:43.1294043Z .................................................................................................... 400/5839
2019-07-20T07:17:47.0088602Z .................................................................................................... 500/5839
2019-07-20T07:17:50.9838985Z ........................................................................i........................... 600/5839
2019-07-20T07:18:00.3007225Z .................................................................................................... 800/5839
2019-07-20T07:18:00.3007225Z .................................................................................................... 800/5839
2019-07-20T07:18:06.0156694Z ..........FFF....................................................................................... 900/5839
2019-07-20T07:18:11.1800562Z ...................................................................................................i 1000/5839
2019-07-20T07:18:16.9801335Z ...........i........................................................................................ 1100/5839
2019-07-20T07:18:21.0278138Z .............................iiiii.................................................................. 1200/5839
2019-07-20T07:18:27.2253200Z .................................................................................................... 1400/5839
2019-07-20T07:18:30.0486735Z .................................................................................................... 1500/5839
2019-07-20T07:18:33.9326550Z .................................................................................................... 1600/5839
2019-07-20T07:18:36.6416946Z .................................................................................................... 1700/5839
2019-07-20T07:18:36.6416946Z .................................................................................................... 1700/5839
2019-07-20T07:18:40.2171420Z ...................................................................i................................ 1800/5839
2019-07-20T07:18:49.0614147Z .................................................................................................... 2000/5839
2019-07-20T07:18:53.5679722Z .................................................................................................... 2100/5839
2019-07-20T07:18:57.4644232Z .................................................................................................... 2200/5839
2019-07-20T07:18:57.4644232Z .................................................................................................... 2200/5839
2019-07-20T07:19:01.3882500Z ..................................................i................................................. 2300/5839
2019-07-20T07:19:11.4050534Z .................................................................................................... 2500/5839
2019-07-20T07:19:15.7244675Z .................................................................................................... 2600/5839
2019-07-20T07:19:20.9255994Z .................................................................................................... 2700/5839
2019-07-20T07:19:25.1223260Z .................................................................................................... 2800/5839
2019-07-20T07:19:25.1223260Z .................................................................................................... 2800/5839
2019-07-20T07:19:29.6406109Z .................................................................................................... 2900/5839
2019-07-20T07:19:34.9786195Z .................................................................................................... 3000/5839
2019-07-20T07:19:39.5655575Z .................................................................................................... 3100/5839
2019-07-20T07:19:44.9977303Z .................................................................................................... 3200/5839
2019-07-20T07:19:48.6430998Z .................................................................................................... 3300/5839
2019-07-20T07:19:52.5362994Z .................................................................................................... 3400/5839
2019-07-20T07:19:57.9624623Z .................................................................................................... 3500/5839
2019-07-20T07:20:01.9470524Z ................i................................................................................... 3600/5839
2019-07-20T07:20:06.1885684Z ..........................................................................................ii...i..ii 3700/5839
2019-07-20T07:20:15.3369853Z .................................................................................................... 3900/5839
2019-07-20T07:20:19.3850831Z .................................................................................................... 4000/5839
2019-07-20T07:20:19.3850831Z .................................................................................................... 4000/5839
2019-07-20T07:20:23.2188878Z ....ii.............................................................................................. 4100/5839
2019-07-20T07:20:25.3631365Z .........................i.......................................................................... 4200/5839
2019-07-20T07:20:27.5203955Z ...........................................................................................i........ 4300/5839
2019-07-20T07:20:35.4319216Z .................................................................................................... 4500/5839
2019-07-20T07:20:53.0497427Z .................................................................................................... 4600/5839
2019-07-20T07:20:56.7049045Z .................................................................................................... 4700/5839
2019-07-20T07:21:00.7760566Z .................................................................................................... 4800/5839
---
2019-07-20T07:21:35.8705675Z .................................................................................................... 5400/5839
2019-07-20T07:21:40.0056520Z .................................................................................................... 5500/5839
2019-07-20T07:21:44.3005101Z .................................................................................................... 5600/5839
2019-07-20T07:21:47.6031615Z .................................................................................................... 5700/5839
2019-07-20T07:21:50.6745648Z ...............................................................................i.................... 5800/5839
2019-07-20T07:21:52.1573911Z failures:
2019-07-20T07:21:52.1629436Z 
2019-07-20T07:21:52.1630670Z ---- [ui] ui/consts/const-eval/const_panic.rs stdout ----
2019-07-20T07:21:52.1630743Z diff of stderr:
2019-07-20T07:21:52.1630743Z diff of stderr:
2019-07-20T07:21:52.1630780Z 
2019-07-20T07:21:52.1630826Z 4 LL | pub const Z: () = panic!("cheese");
2019-07-20T07:21:52.1631297Z 5    | ------------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1631357Z 6    |                   |
2019-07-20T07:21:52.1631667Z -    |                   the evaluated program panicked at 'cheese', $DIR/const_panic.rs:4:19
2019-07-20T07:21:52.1631755Z +    |                   the evaluated program panicked
2019-07-20T07:21:52.1632005Z 9    = note: `#[deny(const_err)]` on by default
2019-07-20T07:21:52.1632409Z 10    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1632470Z 
2019-07-20T07:21:52.1632470Z 
2019-07-20T07:21:52.1632520Z 15 LL | pub const Y: () = unreachable!();
2019-07-20T07:21:52.1632967Z 16    | ------------------^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1633028Z 17    |                   |
2019-07-20T07:21:52.1633496Z -    |                   the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic.rs:7:19
2019-07-20T07:21:52.1633573Z +    |                   the evaluated program panicked
2019-07-20T07:21:52.1634102Z 20    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1634350Z 21 
2019-07-20T07:21:52.1634380Z 
2019-07-20T07:21:52.1634380Z 
2019-07-20T07:21:52.1634422Z 25 LL | pub const X: () = unimplemented!();
2019-07-20T07:21:52.1634671Z 26    | ------------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1634749Z 27    |                   |
2019-07-20T07:21:52.1635177Z -    |                   the evaluated program panicked at 'not yet implemented', $DIR/const_panic.rs:10:19
2019-07-20T07:21:52.1635230Z +    |                   the evaluated program panicked
2019-07-20T07:21:52.1635948Z 30    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1636002Z 31 
2019-07-20T07:21:52.1636029Z 
2019-07-20T07:21:52.1636076Z 
2019-07-20T07:21:52.1636076Z 
2019-07-20T07:21:52.1636120Z The actual stderr differed from the expected stderr.
2019-07-20T07:21:52.1636425Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/const_panic/const_panic.stderr
2019-07-20T07:21:52.1636693Z To update references, rerun the tests and pass the `--bless` flag
2019-07-20T07:21:52.1636995Z To only update this specific test, also pass `--test-args consts/const-eval/const_panic.rs`
2019-07-20T07:21:52.1637089Z error: 1 errors occurred comparing output.
2019-07-20T07:21:52.1637156Z status: exit code: 1
2019-07-20T07:21:52.1637156Z status: exit code: 1
2019-07-20T07:21:52.1638273Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const-eval/const_panic.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-eval/const_panic" "-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-eval/const_panic/auxiliary" "-A" "unused"
2019-07-20T07:21:52.1638621Z ------------------------------------------
2019-07-20T07:21:52.1638657Z 
2019-07-20T07:21:52.1639217Z ------------------------------------------
2019-07-20T07:21:52.1639261Z stderr:
2019-07-20T07:21:52.1639261Z stderr:
2019-07-20T07:21:52.1639598Z ------------------------------------------
2019-07-20T07:21:52.1639666Z error: any use of this value will cause an error
2019-07-20T07:21:52.1640375Z    |
2019-07-20T07:21:52.1640375Z    |
2019-07-20T07:21:52.1640445Z LL | pub const Z: () = panic!("cheese");
2019-07-20T07:21:52.1640672Z    | ------------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1640787Z    |                   the evaluated program panicked
2019-07-20T07:21:52.1640833Z    |
2019-07-20T07:21:52.1640879Z    = note: `#[deny(const_err)]` on by default
2019-07-20T07:21:52.1641214Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1641214Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1641279Z 
2019-07-20T07:21:52.1641327Z error: any use of this value will cause an error
2019-07-20T07:21:52.1641655Z    |
2019-07-20T07:21:52.1641655Z    |
2019-07-20T07:21:52.1641699Z LL | pub const Y: () = unreachable!();
2019-07-20T07:21:52.1641920Z    | ------------------^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1642034Z    |                   the evaluated program panicked
2019-07-20T07:21:52.1642077Z    |
2019-07-20T07:21:52.1642411Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1642453Z 
2019-07-20T07:21:52.1642453Z 
2019-07-20T07:21:52.1642499Z error: any use of this value will cause an error
2019-07-20T07:21:52.1642926Z    |
2019-07-20T07:21:52.1642926Z    |
2019-07-20T07:21:52.1642969Z LL | pub const X: () = unimplemented!();
2019-07-20T07:21:52.1643214Z    | ------------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1643331Z    |                   the evaluated program panicked
2019-07-20T07:21:52.1643383Z    |
2019-07-20T07:21:52.1643870Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1643910Z 
---
2019-07-20T07:21:52.1644655Z 
2019-07-20T07:21:52.1645034Z ---- [ui] ui/consts/const-eval/const_panic_libcore.rs stdout ----
2019-07-20T07:21:52.1645099Z diff of stderr:
2019-07-20T07:21:52.1645127Z 
2019-07-20T07:21:52.1645452Z 4 LL | const Z: () = panic!("cheese");
2019-07-20T07:21:52.1645668Z 5    | --------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1645733Z 6    |               |
2019-07-20T07:21:52.1646001Z -    |               the evaluated program panicked at 'cheese', $DIR/const_panic_libcore.rs:5:15
2019-07-20T07:21:52.1646067Z +    |               the evaluated program panicked
2019-07-20T07:21:52.1646174Z 9    = note: `#[deny(const_err)]` on by default
2019-07-20T07:21:52.1646489Z 10    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1646548Z 
2019-07-20T07:21:52.1646548Z 
2019-07-20T07:21:52.1646592Z 15 LL | const Y: () = unreachable!();
2019-07-20T07:21:52.1646805Z 16    | --------------^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1646870Z 17    |               |
2019-07-20T07:21:52.1647176Z -    |               the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic_libcore.rs:8:15
2019-07-20T07:21:52.1647236Z +    |               the evaluated program panicked
2019-07-20T07:21:52.1647610Z 20    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1647761Z 21 
2019-07-20T07:21:52.1647788Z 
2019-07-20T07:21:52.1647788Z 
2019-07-20T07:21:52.1647850Z 25 LL | const X: () = unimplemented!();
2019-07-20T07:21:52.1648087Z 26    | --------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1648134Z 27    |               |
2019-07-20T07:21:52.1648437Z -    |               the evaluated program panicked at 'not yet implemented', $DIR/const_panic_libcore.rs:11:15
2019-07-20T07:21:52.1648492Z +    |               the evaluated program panicked
2019-07-20T07:21:52.1648860Z 30    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1648922Z 31 
2019-07-20T07:21:52.1648949Z 
2019-07-20T07:21:52.1648975Z 
2019-07-20T07:21:52.1648975Z 
2019-07-20T07:21:52.1649036Z The actual stderr differed from the expected stderr.
2019-07-20T07:21:52.1649350Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/const_panic_libcore/const_panic_libcore.stderr
2019-07-20T07:21:52.1649977Z To update references, rerun the tests and pass the `--bless` flag
2019-07-20T07:21:52.1650311Z To only update this specific test, also pass `--test-args consts/const-eval/const_panic_libcore.rs`
2019-07-20T07:21:52.1650575Z error: 1 errors occurred comparing output.
2019-07-20T07:21:52.1650620Z status: exit code: 1
2019-07-20T07:21:52.1650620Z status: exit code: 1
2019-07-20T07:21:52.1651537Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const-eval/const_panic_libcore.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-eval/const_panic_libcore" "-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-eval/const_panic_libcore/auxiliary" "-A" "unused"
2019-07-20T07:21:52.1651916Z ------------------------------------------
2019-07-20T07:21:52.1651952Z 
2019-07-20T07:21:52.1652176Z ------------------------------------------
2019-07-20T07:21:52.1652242Z stderr:
2019-07-20T07:21:52.1652242Z stderr:
2019-07-20T07:21:52.1652461Z ------------------------------------------
2019-07-20T07:21:52.1652512Z error: any use of this value will cause an error
2019-07-20T07:21:52.1652839Z    |
2019-07-20T07:21:52.1652839Z    |
2019-07-20T07:21:52.1652885Z LL | const Z: () = panic!("cheese");
2019-07-20T07:21:52.1653121Z    | --------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1653225Z    |               the evaluated program panicked
2019-07-20T07:21:52.1653268Z    |
2019-07-20T07:21:52.1653331Z    = note: `#[deny(const_err)]` on by default
2019-07-20T07:21:52.1653653Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1653653Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1653706Z 
2019-07-20T07:21:52.1653773Z error: any use of this value will cause an error
2019-07-20T07:21:52.1654082Z    |
2019-07-20T07:21:52.1654082Z    |
2019-07-20T07:21:52.1654147Z LL | const Y: () = unreachable!();
2019-07-20T07:21:52.1654361Z    | --------------^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1654477Z    |               the evaluated program panicked
2019-07-20T07:21:52.1654521Z    |
2019-07-20T07:21:52.1658182Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1658288Z 
2019-07-20T07:21:52.1658288Z 
2019-07-20T07:21:52.1658367Z error: any use of this value will cause an error
2019-07-20T07:21:52.1658702Z    |
2019-07-20T07:21:52.1658702Z    |
2019-07-20T07:21:52.1658907Z LL | const X: () = unimplemented!();
2019-07-20T07:21:52.1659153Z    | --------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1659269Z    |               the evaluated program panicked
2019-07-20T07:21:52.1659312Z    |
2019-07-20T07:21:52.1659631Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1659675Z 
---
2019-07-20T07:21:52.1660431Z 
2019-07-20T07:21:52.1660684Z ---- [ui] ui/consts/const-eval/const_panic_libcore_main.rs stdout ----
2019-07-20T07:21:52.1660735Z diff of stderr:
2019-07-20T07:21:52.1660783Z 
2019-07-20T07:21:52.1660827Z 4 LL | const Z: () = panic!("cheese");
2019-07-20T07:21:52.1661050Z 5    | --------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1661106Z 6    |               |
2019-07-20T07:21:52.1661408Z -    |               the evaluated program panicked at 'cheese', $DIR/const_panic_libcore_main.rs:9:15
2019-07-20T07:21:52.1661466Z +    |               the evaluated program panicked
2019-07-20T07:21:52.1661576Z 9    = note: `#[deny(const_err)]` on by default
2019-07-20T07:21:52.1661900Z 10    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1661942Z 
2019-07-20T07:21:52.1661942Z 
2019-07-20T07:21:52.1662008Z 15 LL | const Y: () = unreachable!();
2019-07-20T07:21:52.1662326Z 16    | --------------^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1662381Z 17    |               |
2019-07-20T07:21:52.1662740Z -    |               the evaluated program panicked at 'internal error: entered unreachable code', $DIR/const_panic_libcore_main.rs:12:15
2019-07-20T07:21:52.1662800Z +    |               the evaluated program panicked
2019-07-20T07:21:52.1663194Z 20    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1663249Z 21 
2019-07-20T07:21:52.1663280Z 
2019-07-20T07:21:52.1663280Z 
2019-07-20T07:21:52.1663323Z 25 LL | const X: () = unimplemented!();
2019-07-20T07:21:52.1663563Z 26    | --------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1663612Z 27    |               |
2019-07-20T07:21:52.1663907Z -    |               the evaluated program panicked at 'not yet implemented', $DIR/const_panic_libcore_main.rs:15:15
2019-07-20T07:21:52.1663991Z +    |               the evaluated program panicked
2019-07-20T07:21:52.1664356Z 30    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1664430Z 31 
2019-07-20T07:21:52.1664458Z 
2019-07-20T07:21:52.1664493Z 
2019-07-20T07:21:52.1664493Z 
2019-07-20T07:21:52.1664538Z The actual stderr differed from the expected stderr.
2019-07-20T07:21:52.1664892Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/const-eval/const_panic_libcore_main/const_panic_libcore_main.stderr
2019-07-20T07:21:52.1665150Z To update references, rerun the tests and pass the `--bless` flag
2019-07-20T07:21:52.1665473Z To only update this specific test, also pass `--test-args consts/const-eval/const_panic_libcore_main.rs`
2019-07-20T07:21:52.1665581Z error: 1 errors occurred comparing output.
2019-07-20T07:21:52.1665628Z status: exit code: 1
2019-07-20T07:21:52.1665628Z status: exit code: 1
2019-07-20T07:21:52.1666581Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/const-eval/const_panic_libcore_main.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-eval/const_panic_libcore_main" "-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-eval/const_panic_libcore_main/auxiliary" "-A" "unused"
2019-07-20T07:21:52.1667013Z ------------------------------------------
2019-07-20T07:21:52.1667049Z 
2019-07-20T07:21:52.1667269Z ------------------------------------------
2019-07-20T07:21:52.1667313Z stderr:
2019-07-20T07:21:52.1667313Z stderr:
2019-07-20T07:21:52.1675625Z ------------------------------------------
2019-07-20T07:21:52.1675701Z error: any use of this value will cause an error
2019-07-20T07:21:52.1676203Z    |
2019-07-20T07:21:52.1676203Z    |
2019-07-20T07:21:52.1676413Z LL | const Z: () = panic!("cheese");
2019-07-20T07:21:52.1676632Z    | --------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1676751Z    |               the evaluated program panicked
2019-07-20T07:21:52.1676793Z    |
2019-07-20T07:21:52.1676836Z    = note: `#[deny(const_err)]` on by default
2019-07-20T07:21:52.1677158Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1677158Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1677202Z 
2019-07-20T07:21:52.1677254Z error: any use of this value will cause an error
2019-07-20T07:21:52.1677971Z    |
2019-07-20T07:21:52.1677971Z    |
2019-07-20T07:21:52.1678011Z LL | const Y: () = unreachable!();
2019-07-20T07:21:52.1678387Z    | --------------^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1678486Z    |               the evaluated program panicked
2019-07-20T07:21:52.1678546Z    |
2019-07-20T07:21:52.1678863Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1678912Z 
2019-07-20T07:21:52.1678912Z 
2019-07-20T07:21:52.1678956Z error: any use of this value will cause an error
2019-07-20T07:21:52.1679298Z    |
2019-07-20T07:21:52.1679298Z    |
2019-07-20T07:21:52.1679340Z LL | const X: () = unimplemented!();
2019-07-20T07:21:52.1679573Z    | --------------^^^^^^^^^^^^^^^^-
2019-07-20T07:21:52.1679663Z    |               the evaluated program panicked
2019-07-20T07:21:52.1679723Z    |
2019-07-20T07:21:52.1680714Z    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
2019-07-20T07:21:52.1680763Z 
---
2019-07-20T07:21:52.1684330Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:535:22
2019-07-20T07:21:52.1684395Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-07-20T07:21:52.1684444Z 
2019-07-20T07:21:52.1684468Z 
2019-07-20T07:21:52.1685814Z 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-07-20T07:21:52.1686230Z 
2019-07-20T07:21:52.1686258Z 
2019-07-20T07:21:52.1686300Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-07-20T07:21:52.1686365Z Build completed unsuccessfully in 0:55:54
2019-07-20T07:21:52.1686365Z Build completed unsuccessfully in 0:55:54
2019-07-20T07:21:53.3243412Z ##[error]Bash exited with code '1'.
2019-07-20T07:21:53.3281195Z ##[section]Starting: Checkout
2019-07-20T07:21:53.3283007Z ==============================================================================
2019-07-20T07:21:53.3283085Z Task         : Get sources
2019-07-20T07:21:53.3283135Z 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
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (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-07-20T13:47:21.0576666Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-20T13:47:21.0810915Z ##[command]git config gc.auto 0
2019-07-20T13:47:21.0872732Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-20T13:47:21.0920801Z ##[command]git config --get-all http.proxy
2019-07-20T13:47:21.1050621Z ##[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/60951/merge:refs/remotes/pull/60951/merge
---
2019-07-20T13:47:53.8477634Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-20T13:47:53.8478003Z 
2019-07-20T13:47:53.8478228Z   git checkout -b <new-branch-name>
2019-07-20T13:47:53.8478252Z 
2019-07-20T13:47:53.8478310Z HEAD is now at f110b0373 Merge 61fc12eac0a66516886c3d4f539b137e117d4d65 into f69b07144a151f46aaee1b6230ba4160e9394562
2019-07-20T13:47:53.8613569Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-20T13:47:53.8616512Z ==============================================================================
2019-07-20T13:47:53.8616595Z Task         : Bash
2019-07-20T13:47:53.8616643Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-20T13:54:05.6226164Z    Compiling serde_json v1.0.40
2019-07-20T13:54:09.8876300Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2019-07-20T13:54:18.3802127Z     Finished release [optimized] target(s) in 1m 27s
2019-07-20T13:54:18.3873454Z tidy check
2019-07-20T13:54:18.7465169Z tidy error: /checkout/src/librustc/mir/mod.rs:3090: line longer than 100 chars
2019-07-20T13:54:18.7465444Z tidy error: /checkout/src/librustc/mir/mod.rs:3135: line longer than 100 chars
2019-07-20T13:54:20.1929163Z some tidy checks failed
2019-07-20T13:54:20.1935196Z 
2019-07-20T13:54:20.1935196Z 
2019-07-20T13:54:20.1936814Z 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-07-20T13:54:20.1936958Z 
2019-07-20T13:54:20.1936981Z 
2019-07-20T13:54:20.1948714Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2019-07-20T13:54:20.1948791Z Build completed unsuccessfully in 0:01:30
2019-07-20T13:54:20.1948791Z Build completed unsuccessfully in 0:01:30
2019-07-20T13:54:21.5463663Z ##[error]Bash exited with code '1'.
2019-07-20T13:54:21.5495146Z ##[section]Starting: Checkout
2019-07-20T13:54:21.5520755Z ==============================================================================
2019-07-20T13:54:21.5520813Z Task         : Get sources
2019-07-20T13:54:21.5520860Z 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)

@Dylan-DPC-zz Dylan-DPC-zz removed the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Jul 22, 2019
@saleemjaffer
Copy link
Contributor Author

@oli-obk How does it look?

Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

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

Just two small things, then it's ready to go

| OverflowNeg
| DivisionByZero
| RemainderByZero
| Panic(EvalErrorPanic::Panic { .. })
Copy link
Contributor

Choose a reason for hiding this comment

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

just use Panic(_) instead of listing all of these.

This code here is one of the reasons we want a Panic variant

@@ -228,6 +228,24 @@ impl<'tcx> From<InterpError<'tcx, u64>> for InterpErrorInfo<'tcx> {

pub type AssertMessage<'tcx> = InterpError<'tcx, mir::Operand<'tcx>>;

#[derive(Clone, RustcEncodable, RustcDecodable, HashStable)]
pub enum EvalErrorPanic<O> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Name this enum PanicMessage. This way it makes more sense when we'll start reusing it in TerminatorKind::Assert's msg field

@saleemjaffer
Copy link
Contributor Author

@oli-obk Made the changes.

@oli-obk oli-obk changed the title [WIP] more specific errors in src/librustc/mir/interpret/error.rs more specific errors in src/librustc/mir/interpret/error.rs Jul 23, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Jul 23, 2019

Thanks!

@bors r+

If you are interested in continuing this avenue, you can (on top of this PR, but in a new PR and branch) change the type of the msg field of TerminatorKind::Assert to PanicMessage. I don't know if that will cause any unusual fallout, but it should not.

@bors
Copy link
Contributor

bors commented Jul 23, 2019

📌 Commit 3730ed9 has been approved by oli-obk

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 23, 2019
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jul 23, 2019
… r=oli-obk

more specific errors in src/librustc/mir/interpret/error.rs

Implements [this](rust-lang/const-eval#4)
bors added a commit that referenced this pull request Jul 23, 2019
Rollup of 14 pull requests

Successful merges:

 - #60951 (more specific errors in src/librustc/mir/interpret/error.rs)
 - #62523 (Delay bug to resolve HRTB ICE)
 - #62656 (explain how to search in slice without owned data)
 - #62791 (Handle more cases of typos misinterpreted as type ascription)
 - #62804 (rustc_typeck: improve diagnostics for _ const/static declarations)
 - #62808 (Revert "Disable stack probing for gnux32.")
 - #62817 (Tweak span for variant not found error)
 - #62842 (Add tests for issue-58887)
 - #62851 (move unescape module to rustc_lexer)
 - #62859 (Place::as_place_ref is now Place::as_ref)
 - #62869 (add rustc_private as a proper language feature gate)
 - #62880 (normalize use of backticks in compiler messages for librustc_allocator)
 - #62885 (Change "OSX" to "macOS")
 - #62889 (Update stage0.txt)

Failed merges:

r? @ghost
@bors bors merged commit 3730ed9 into rust-lang:master Jul 23, 2019
tesuji added a commit to tesuji/miri that referenced this pull request Jul 24, 2019
tesuji added a commit to tesuji/miri that referenced this pull request Jul 24, 2019
bors added a commit to rust-lang/miri that referenced this pull request Jul 24, 2019
bors added a commit to rust-lang/miri that referenced this pull request Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants