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 explanation message for E0641 #66461

Merged
merged 2 commits into from
Nov 19, 2019
Merged

Add explanation message for E0641 #66461

merged 2 commits into from
Nov 19, 2019

Conversation

clemkoh
Copy link
Contributor

@clemkoh clemkoh commented Nov 16, 2019

Part of #61137

@rust-highfive
Copy link
Collaborator

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @varkor (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 16, 2019
@rust-highfive
Copy link
Collaborator

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-16T00:19:43.6866540Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-16T00:19:43.7046411Z ##[command]git config gc.auto 0
2019-11-16T00:19:43.7130307Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-16T00:19:44.2690503Z ##[command]git config --get-all http.proxy
2019-11-16T00:19:44.2693616Z ##[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/66461/merge:refs/remotes/pull/66461/merge
---
2019-11-16T00:32:45.6421018Z    Compiling rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
2019-11-16T00:32:46.2825771Z error[E0425]: cannot find value `E0641` in this scope
2019-11-16T00:32:46.2827017Z    --> src/librustc_typeck/check/cast.rs:316:73
2019-11-16T00:32:46.2827644Z     |
2019-11-16T00:32:46.2828294Z 316 |                 let mut err = struct_span_err!(fcx.tcx.sess, self.span, E0641,
2019-11-16T00:32:46.2829040Z     |                                                                         ^^^^^ help: a constant with a similar name exists: `E0541`
2019-11-16T00:32:49.9098824Z error: aborting due to previous error
2019-11-16T00:32:49.9103277Z 
2019-11-16T00:32:49.9112835Z For more information about this error, try `rustc --explain E0425`.
2019-11-16T00:32:49.9568717Z error: could not compile `rustc_typeck`.
---
2019-11-16T00:36:28.8942862Z   local time: Sat Nov 16 00:36:28 UTC 2019
2019-11-16T00:36:29.1738211Z   network time: Sat, 16 Nov 2019 00:36:29 GMT
2019-11-16T00:36:29.1747619Z == end clock drift check ==
2019-11-16T00:36:31.9676234Z 
2019-11-16T00:36:31.9774881Z ##[error]Bash exited with code '1'.
2019-11-16T00:36:31.9805135Z ##[section]Starting: Checkout
2019-11-16T00:36:31.9807003Z ==============================================================================
2019-11-16T00:36:31.9807482Z Task         : Get sources
2019-11-16T00:36:31.9807555Z 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 (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-16T02:45:21.5823170Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-16T02:45:21.6033160Z ##[command]git config gc.auto 0
2019-11-16T02:45:21.6132487Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-16T02:45:21.6188383Z ##[command]git config --get-all http.proxy
2019-11-16T02:45:21.6367276Z ##[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/66461/merge:refs/remotes/pull/66461/merge
---
2019-11-16T03:46:16.6988323Z .................................................................................................... 1500/9244
2019-11-16T03:46:22.9966432Z .................................................................................................... 1600/9244
2019-11-16T03:46:32.4391462Z .................................................................................................... 1700/9244
2019-11-16T03:46:41.5415628Z .....i.............................................................................................. 1800/9244
2019-11-16T03:46:48.4940475Z .........................................................................................iiiii...... 1900/9244
2019-11-16T03:47:10.9024178Z .................................................................................................... 2100/9244
2019-11-16T03:47:13.4464137Z .................................................................................................... 2200/9244
2019-11-16T03:47:16.1568950Z .................................................................................................... 2300/9244
2019-11-16T03:47:22.8122291Z .................................................................................................... 2400/9244
---
2019-11-16T03:50:25.8241950Z ..........F.............................................................................i........... 4700/9244
2019-11-16T03:50:32.9433158Z ....i............................................................................................... 4800/9244
2019-11-16T03:50:42.7019069Z .................................................................................................... 4900/9244
2019-11-16T03:50:48.2384582Z .................................................................................................... 5000/9244
2019-11-16T03:50:59.2912122Z ............................................................................................ii.ii... 5100/9244
2019-11-16T03:51:08.3699550Z ............................i....................................................................... 5300/9244
2019-11-16T03:51:17.1186462Z .................................................................................................... 5400/9244
2019-11-16T03:51:25.9233158Z ..........................................................................i......................... 5500/9244
2019-11-16T03:51:33.8208711Z .................................................................................................... 5600/9244
2019-11-16T03:51:33.8208711Z .................................................................................................... 5600/9244
2019-11-16T03:51:40.8531040Z .................................................................................................... 5700/9244
2019-11-16T03:51:51.1558539Z ............................................................ii...i..ii...........i.................. 5800/9244
2019-11-16T03:52:14.5162466Z .................................................................................................... 6000/9244
2019-11-16T03:52:22.7481265Z .................................................................................................... 6100/9244
2019-11-16T03:52:22.7481265Z .................................................................................................... 6100/9244
2019-11-16T03:52:27.4694626Z ...............................................................................i..ii................ 6200/9244
2019-11-16T03:52:57.4497469Z ..........................F......................................................................... 6400/9244
2019-11-16T03:53:00.8262684Z ...............................................i.................................................... 6500/9244
2019-11-16T03:53:03.2044987Z .................................................................................................... 6600/9244
2019-11-16T03:53:05.7561417Z ..................................i................................................................. 6700/9244
---
2019-11-16T03:58:05.9074555Z 
2019-11-16T03:58:05.9074685Z 
2019-11-16T03:58:05.9074868Z The actual stderr differed from the expected stderr.
2019-11-16T03:58:05.9075667Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-45730/issue-45730.stderr
2019-11-16T03:58:05.9076182Z To update references, rerun the tests and pass the `--bless` flag
2019-11-16T03:58:05.9077139Z To only update this specific test, also pass `--test-args issues/issue-45730.rs`
2019-11-16T03:58:05.9077601Z error: 1 errors occurred comparing output.
2019-11-16T03:58:05.9077786Z status: exit code: 1
2019-11-16T03:58:05.9077786Z status: exit code: 1
2019-11-16T03:58:05.9078833Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-45730.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-45730" "-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-45730/auxiliary" "-A" "unused"
2019-11-16T03:58:05.9079573Z ------------------------------------------
2019-11-16T03:58:05.9079757Z 
2019-11-16T03:58:05.9080157Z ------------------------------------------
2019-11-16T03:58:05.9080359Z stderr:
2019-11-16T03:58:05.9080359Z stderr:
2019-11-16T03:58:05.9080841Z ------------------------------------------
2019-11-16T03:58:05.9081093Z error[E0641]: cannot cast to a pointer of an unknown kind
2019-11-16T03:58:05.9081525Z   --> /checkout/src/test/ui/issues/issue-45730.rs:3:23
2019-11-16T03:58:05.9081896Z    |
2019-11-16T03:58:05.9082120Z LL |     let x: *const _ = 0 as _; //~ ERROR cannot cast
2019-11-16T03:58:05.9082799Z    |                            |
2019-11-16T03:58:05.9082968Z    |                            help: consider giving more type information
2019-11-16T03:58:05.9083154Z    |
2019-11-16T03:58:05.9083326Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
2019-11-16T03:58:05.9083326Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
2019-11-16T03:58:05.9083482Z 
2019-11-16T03:58:05.9083683Z error[E0641]: cannot cast to a pointer of an unknown kind
2019-11-16T03:58:05.9084119Z   --> /checkout/src/test/ui/issues/issue-45730.rs:5:23
2019-11-16T03:58:05.9084344Z    |
2019-11-16T03:58:05.9084506Z LL |     let x: *const _ = 0 as *const _; //~ ERROR cannot cast
2019-11-16T03:58:05.9085151Z    |                            |
2019-11-16T03:58:05.9085327Z    |                            help: consider giving more type information
2019-11-16T03:58:05.9085504Z    |
2019-11-16T03:58:05.9085674Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
2019-11-16T03:58:05.9085674Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
2019-11-16T03:58:05.9085820Z 
2019-11-16T03:58:05.9085982Z error[E0641]: cannot cast to a pointer of an unknown kind
2019-11-16T03:58:05.9086414Z   --> /checkout/src/test/ui/issues/issue-45730.rs:8:13
2019-11-16T03:58:05.9087010Z    |
2019-11-16T03:58:05.9087214Z LL |     let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast
2019-11-16T03:58:05.9087959Z    |                                            |
2019-11-16T03:58:05.9088140Z    |                                            help: consider giving more type information
2019-11-16T03:58:05.9088326Z    |
2019-11-16T03:58:05.9088521Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
---
2019-11-16T03:58:05.9092887Z 13 
2019-11-16T03:58:05.9093030Z 
2019-11-16T03:58:05.9093165Z 
2019-11-16T03:58:05.9093329Z The actual stderr differed from the expected stderr.
2019-11-16T03:58:05.9095628Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/order-dependent-cast-inference/order-dependent-cast-inference.stderr
2019-11-16T03:58:05.9096037Z To update references, rerun the tests and pass the `--bless` flag
2019-11-16T03:58:05.9096402Z To only update this specific test, also pass `--test-args order-dependent-cast-inference.rs`
2019-11-16T03:58:05.9097054Z error: 1 errors occurred comparing output.
2019-11-16T03:58:05.9097133Z status: exit code: 1
2019-11-16T03:58:05.9097133Z status: exit code: 1
2019-11-16T03:58:05.9098247Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/order-dependent-cast-inference.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/order-dependent-cast-inference" "-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/order-dependent-cast-inference/auxiliary" "-A" "unused"
2019-11-16T03:58:05.9098686Z ------------------------------------------
2019-11-16T03:58:05.9098726Z 
2019-11-16T03:58:05.9098999Z ------------------------------------------
2019-11-16T03:58:05.9099049Z stderr:
2019-11-16T03:58:05.9099049Z stderr:
2019-11-16T03:58:05.9099282Z ------------------------------------------
2019-11-16T03:58:05.9099357Z error[E0641]: cannot cast to a pointer of an unknown kind
2019-11-16T03:58:05.9099645Z   --> /checkout/src/test/ui/order-dependent-cast-inference.rs:5:17
2019-11-16T03:58:05.9099701Z    |
2019-11-16T03:58:05.9099768Z LL |     let mut y = 0 as *const _;
2019-11-16T03:58:05.9100061Z    |                      |
2019-11-16T03:58:05.9100116Z    |                      help: consider giving more type information
2019-11-16T03:58:05.9100184Z    |
2019-11-16T03:58:05.9100251Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
---
2019-11-16T03:58:05.9111352Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-16T03:58:05.9112736Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-16T03:58:05.9130705Z 
2019-11-16T03:58:05.9131175Z 
2019-11-16T03:58:05.9133138Z 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-16T03:58:05.9135477Z 
2019-11-16T03:58:05.9135657Z 
2019-11-16T03:58:05.9140933Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-16T03:58:05.9142135Z Build completed unsuccessfully in 1:06:34
2019-11-16T03:58:05.9142135Z Build completed unsuccessfully in 1:06:34
2019-11-16T03:58:05.9197101Z == clock drift check ==
2019-11-16T03:58:05.9210131Z   local time: Sat Nov 16 03:58:05 UTC 2019
2019-11-16T03:58:06.4568893Z   network time: Sat, 16 Nov 2019 03:58:06 GMT
2019-11-16T03:58:06.4571960Z == end clock drift check ==
2019-11-16T03:58:07.2439097Z 
2019-11-16T03:58:07.2511292Z ##[error]Bash exited with code '1'.
2019-11-16T03:58:07.2556393Z ##[section]Starting: Checkout
2019-11-16T03:58:07.2558712Z ==============================================================================
2019-11-16T03:58:07.2558774Z Task         : Get sources
2019-11-16T03:58:07.2558848Z 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 (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-16T04:47:55.4545584Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-16T04:47:55.4745288Z ##[command]git config gc.auto 0
2019-11-16T04:47:55.4825827Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-16T04:47:55.4889966Z ##[command]git config --get-all http.proxy
2019-11-16T04:47:55.5037160Z ##[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/66461/merge:refs/remotes/pull/66461/merge
---
2019-11-16T05:45:32.6480193Z .................................................................................................... 1500/9244
2019-11-16T05:45:38.9862087Z .................................................................................................... 1600/9244
2019-11-16T05:45:48.5781758Z .................................................................................................... 1700/9244
2019-11-16T05:45:57.6691519Z .....i.............................................................................................. 1800/9244
2019-11-16T05:46:04.6470973Z .........................................................................................iiiii...... 1900/9244
2019-11-16T05:46:26.4760567Z .................................................................................................... 2100/9244
2019-11-16T05:46:28.9464562Z .................................................................................................... 2200/9244
2019-11-16T05:46:31.6890721Z .................................................................................................... 2300/9244
2019-11-16T05:46:38.3559258Z .................................................................................................... 2400/9244
---
2019-11-16T05:49:38.1709288Z ..........F.............................................................................i........... 4700/9244
2019-11-16T05:49:45.0850615Z ....i............................................................................................... 4800/9244
2019-11-16T05:49:54.4177600Z .................................................................................................... 4900/9244
2019-11-16T05:49:59.9174228Z .................................................................................................... 5000/9244
2019-11-16T05:50:10.6858480Z ............................................................................................ii.ii... 5100/9244
2019-11-16T05:50:19.5256652Z ............................i....................................................................... 5300/9244
2019-11-16T05:50:28.0580908Z .................................................................................................... 5400/9244
2019-11-16T05:50:37.0893986Z ..........................................................................i......................... 5500/9244
2019-11-16T05:50:45.2826776Z .................................................................................................... 5600/9244
2019-11-16T05:50:45.2826776Z .................................................................................................... 5600/9244
2019-11-16T05:50:52.3903971Z .................................................................................................... 5700/9244
2019-11-16T05:51:03.2797795Z ............................................................ii...i..ii...........i.................. 5800/9244
2019-11-16T05:51:26.1972309Z .................................................................................................... 6000/9244
2019-11-16T05:51:34.7291719Z .................................................................................................... 6100/9244
2019-11-16T05:51:34.7291719Z .................................................................................................... 6100/9244
2019-11-16T05:51:40.3305538Z ...............................................................................i..ii................ 6200/9244
2019-11-16T05:52:09.5767855Z ..........................F......................................................................... 6400/9244
2019-11-16T05:52:12.8757427Z ...............................................i.................................................... 6500/9244
2019-11-16T05:52:15.2176054Z .................................................................................................... 6600/9244
2019-11-16T05:52:17.7433250Z ..................................i................................................................. 6700/9244
---
2019-11-16T05:57:12.1820424Z 
2019-11-16T05:57:12.1820535Z 
2019-11-16T05:57:12.1820698Z The actual stderr differed from the expected stderr.
2019-11-16T05:57:12.1821192Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-45730/issue-45730.stderr
2019-11-16T05:57:12.1821600Z To update references, rerun the tests and pass the `--bless` flag
2019-11-16T05:57:12.1822061Z To only update this specific test, also pass `--test-args issues/issue-45730.rs`
2019-11-16T05:57:12.1822532Z error: 1 errors occurred comparing output.
2019-11-16T05:57:12.1822690Z status: exit code: 1
2019-11-16T05:57:12.1822690Z status: exit code: 1
2019-11-16T05:57:12.1823521Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-45730.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-45730" "-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-45730/auxiliary" "-A" "unused"
2019-11-16T05:57:12.1824113Z ------------------------------------------
2019-11-16T05:57:12.1824475Z 
2019-11-16T05:57:12.1824821Z ------------------------------------------
2019-11-16T05:57:12.1825402Z stderr:
2019-11-16T05:57:12.1825402Z stderr:
2019-11-16T05:57:12.1825917Z ------------------------------------------
2019-11-16T05:57:12.1826091Z error[E0641]: cannot cast to a pointer of an unknown kind
2019-11-16T05:57:12.1826798Z   --> /checkout/src/test/ui/issues/issue-45730.rs:3:23
2019-11-16T05:57:12.1827164Z    |
2019-11-16T05:57:12.1827303Z LL |     let x: *const _ = 0 as _; //~ ERROR cannot cast
2019-11-16T05:57:12.1830342Z    |                            |
2019-11-16T05:57:12.1830498Z    |                            help: consider giving more type information
2019-11-16T05:57:12.1831919Z    |
2019-11-16T05:57:12.1832093Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
2019-11-16T05:57:12.1832093Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
2019-11-16T05:57:12.1832222Z 
2019-11-16T05:57:12.1832387Z error[E0641]: cannot cast to a pointer of an unknown kind
2019-11-16T05:57:12.1833081Z   --> /checkout/src/test/ui/issues/issue-45730.rs:5:23
2019-11-16T05:57:12.1833274Z    |
2019-11-16T05:57:12.1833446Z LL |     let x: *const _ = 0 as *const _; //~ ERROR cannot cast
2019-11-16T05:57:12.1834001Z    |                            |
2019-11-16T05:57:12.1834176Z    |                            help: consider giving more type information
2019-11-16T05:57:12.1834320Z    |
2019-11-16T05:57:12.1834623Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
2019-11-16T05:57:12.1834623Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
2019-11-16T05:57:12.1834807Z 
2019-11-16T05:57:12.1834955Z error[E0641]: cannot cast to a pointer of an unknown kind
2019-11-16T05:57:12.1835946Z   --> /checkout/src/test/ui/issues/issue-45730.rs:8:13
2019-11-16T05:57:12.1836133Z    |
2019-11-16T05:57:12.1836278Z LL |     let x = 0 as *const i32 as *const _ as *mut _; //~ ERROR cannot cast
2019-11-16T05:57:12.1836842Z    |                                            |
2019-11-16T05:57:12.1836990Z    |                                            help: consider giving more type information
2019-11-16T05:57:12.1837147Z    |
2019-11-16T05:57:12.1837314Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
---
2019-11-16T05:57:12.1841188Z + 
2019-11-16T05:57:12.1841214Z 
2019-11-16T05:57:12.1841239Z 
2019-11-16T05:57:12.1841283Z The actual stderr differed from the expected stderr.
2019-11-16T05:57:12.1841627Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/order-dependent-cast-inference/order-dependent-cast-inference.stderr
2019-11-16T05:57:12.1841886Z To update references, rerun the tests and pass the `--bless` flag
2019-11-16T05:57:12.1842411Z To only update this specific test, also pass `--test-args order-dependent-cast-inference.rs`
2019-11-16T05:57:12.1842511Z error: 1 errors occurred comparing output.
2019-11-16T05:57:12.1842553Z status: exit code: 1
2019-11-16T05:57:12.1842553Z status: exit code: 1
2019-11-16T05:57:12.1843322Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/order-dependent-cast-inference.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/order-dependent-cast-inference" "-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/order-dependent-cast-inference/auxiliary" "-A" "unused"
2019-11-16T05:57:12.1843639Z ------------------------------------------
2019-11-16T05:57:12.1843671Z 
2019-11-16T05:57:12.1843891Z ------------------------------------------
2019-11-16T05:57:12.1843934Z stderr:
2019-11-16T05:57:12.1843934Z stderr:
2019-11-16T05:57:12.1844161Z ------------------------------------------
2019-11-16T05:57:12.1844348Z error[E0641]: cannot cast to a pointer of an unknown kind
2019-11-16T05:57:12.1844621Z   --> /checkout/src/test/ui/order-dependent-cast-inference.rs:5:17
2019-11-16T05:57:12.1844686Z    |
2019-11-16T05:57:12.1844727Z LL |     let mut y = 0 as *const _;
2019-11-16T05:57:12.1844992Z    |                      |
2019-11-16T05:57:12.1845039Z    |                      help: consider giving more type information
2019-11-16T05:57:12.1845081Z    |
2019-11-16T05:57:12.1845147Z    = note: The type information given here is insufficient to check whether the pointer cast is valid
---
2019-11-16T05:57:12.1874463Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-11-16T05:57:12.1874542Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-11-16T05:57:12.9662436Z 
2019-11-16T05:57:12.9662831Z 
2019-11-16T05:57:12.9664691Z 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-16T05:57:12.9665141Z 
2019-11-16T05:57:12.9665186Z 
2019-11-16T05:57:12.9665576Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-11-16T05:57:12.9665692Z Build completed unsuccessfully in 1:03:10
2019-11-16T05:57:12.9665692Z Build completed unsuccessfully in 1:03:10
2019-11-16T05:57:12.9665759Z == clock drift check ==
2019-11-16T05:57:12.9665823Z   local time: Sat Nov 16 05:57:12 UTC 2019
2019-11-16T05:57:12.9665904Z   network time: Sat, 16 Nov 2019 05:57:12 GMT
2019-11-16T05:57:12.9665964Z == end clock drift check ==
2019-11-16T05:57:13.3640946Z 
2019-11-16T05:57:13.3734346Z ##[error]Bash exited with code '1'.
2019-11-16T05:57:13.3780644Z ##[section]Starting: Checkout
2019-11-16T05:57:13.3782248Z ==============================================================================
2019-11-16T05:57:13.3782297Z Task         : Get sources
2019-11-16T05:57:13.3782338Z 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)

@@ -0,0 +1,20 @@

Copy link
Member

Choose a reason for hiding this comment

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

Please remove this empty line.

@@ -30,3 +30,4 @@ LL | let x = 0 as *const i32 as *const _ as *mut _;

error: aborting due to 3 previous errors

+ For more information about this error, try `rustc --explain E0641`.
Copy link
Member

Choose a reason for hiding this comment

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

What's going on in here? XD

@GuillaumeGomez
Copy link
Member

Thanks for your PR!

To fix your errors (the stderr ones), just run:

./x.py test src/test/ui --stage 1 --bless

Also, it'd be awesome if you could keep the long error explanation into the first commit and the ui tests update into a second one.

@clemkoh
Copy link
Contributor Author

clemkoh commented Nov 16, 2019

Took some rewriting but hopefully it’s okay now!

@GuillaumeGomez
Copy link
Member

Perfect, thanks a lot!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Nov 17, 2019

📌 Commit dc137dd has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 17, 2019
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 17, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 19, 2019
bors added a commit that referenced this pull request Nov 19, 2019
Rollup of 13 pull requests

Successful merges:

 - #66090 (Misc CI improvements)
 - #66239 (Suggest calling async closure when needed)
 - #66430 ([doc] Fix the source code highlighting on source comments)
 - #66431 (Fix 'type annotations needed' error with opaque types)
 - #66461 (Add explanation message for E0641)
 - #66468 (Cleanup Miri SIMD intrinsics)
 - #66478 (rustc_plugin: Remove the compatibility shim)
 - #66493 (Add JohnTitor to rustc-guide toolstate notification list)
 - #66511 (std::error::Chain: remove Copy)
 - #66512 (Add unix::process::CommandExt::arg0)
 - #66520 (Disable gdb pretty printer global section on wasm targets)
 - #66529 (resolve: Give derive helpers highest priority during resolution)
 - #66536 (Move the definition of `QueryResult` into `plumbing.rs`.)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Nov 19, 2019
bors added a commit that referenced this pull request Nov 19, 2019
Rollup of 11 pull requests

Successful merges:

 - #66090 (Misc CI improvements)
 - #66155 (Add long error explanation for E0594)
 - #66239 (Suggest calling async closure when needed)
 - #66430 ([doc] Fix the source code highlighting on source comments)
 - #66431 (Fix 'type annotations needed' error with opaque types)
 - #66461 (Add explanation message for E0641)
 - #66493 (Add JohnTitor to rustc-guide toolstate notification list)
 - #66511 (std::error::Chain: remove Copy)
 - #66529 (resolve: Give derive helpers highest priority during resolution)
 - #66536 (Move the definition of `QueryResult` into `plumbing.rs`.)
 - #66538 (Remove compiler_builtins_lib feature from libstd)

Failed merges:

r? @ghost
@bors bors merged commit dc137dd into rust-lang:master Nov 19, 2019
@bors
Copy link
Contributor

bors commented Nov 19, 2019

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

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants