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

Fix pointing at arg when cause is outside of call #66933

Closed
wants to merge 2 commits into from

Conversation

VirrageS
Copy link
Contributor

@VirrageS VirrageS commented Dec 1, 2019

Closes: #66923

@rust-highfive
Copy link
Collaborator

r? @eddyb

(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 Dec 1, 2019
@eddyb
Copy link
Member

eddyb commented Dec 2, 2019

r? @estebank or @Centril

@rust-highfive rust-highfive assigned estebank and unassigned eddyb Dec 2, 2019
@Centril
Copy link
Contributor

Centril commented Dec 3, 2019

r? @Centril

@rust-highfive rust-highfive assigned Centril and unassigned estebank Dec 3, 2019
@Centril Centril 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 Dec 3, 2019
@Centril
Copy link
Contributor

Centril commented Dec 3, 2019

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 3, 2019

📌 Commit 7ec5769254aa1c2aa69eb38dd8b90057dc29ad26 has been approved by Centril

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 3, 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-12-03T07:22:14.3663137Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-03T07:22:14.3873475Z ##[command]git config gc.auto 0
2019-12-03T07:22:14.3954831Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-03T07:22:14.3990374Z ##[command]git config --get-all http.proxy
2019-12-03T07:22:14.4163069Z ##[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/66933/merge:refs/remotes/pull/66933/merge
---
2019-12-03T08:16:40.7317750Z .................................................................................................... 1600/9320
2019-12-03T08:16:45.0268794Z .................................................................................................... 1700/9320
2019-12-03T08:16:56.8223071Z ........................................i........................................................... 1800/9320
2019-12-03T08:17:04.0446688Z .................................................................................................... 1900/9320
2019-12-03T08:17:16.5821982Z .........................iiiii...................................................................... 2000/9320
2019-12-03T08:17:26.1344992Z .................................................................................................... 2200/9320
2019-12-03T08:17:28.4985744Z .................................................................................................... 2300/9320
2019-12-03T08:17:32.7561689Z .................................................................................................... 2400/9320
2019-12-03T08:17:52.8957538Z .................................................................................................... 2500/9320
---
2019-12-03T08:20:23.7615803Z ..........................i...............i......................................................... 4800/9320
2019-12-03T08:20:33.2341657Z .................................................................................................... 4900/9320
2019-12-03T08:20:38.6138331Z .................................................................................................... 5000/9320
2019-12-03T08:20:45.9046769Z ...............................F.................................................................... 5100/9320
2019-12-03T08:20:52.7716309Z .................................ii.ii...........i.................................................. 5200/9320
2019-12-03T08:21:01.3320206Z .................................................................................................... 5400/9320
2019-12-03T08:21:10.2881854Z .................................................................................................... 5500/9320
2019-12-03T08:21:16.9077499Z ...............i.................................................................................... 5600/9320
2019-12-03T08:21:22.3460832Z .................................................................................................... 5700/9320
2019-12-03T08:21:22.3460832Z .................................................................................................... 5700/9320
2019-12-03T08:21:33.0187663Z .................................................................................................... 5800/9320
2019-12-03T08:21:44.3520515Z .ii...i..ii...........i............................................................................. 5900/9320
2019-12-03T08:22:01.4604676Z .................................................................................................... 6100/9320
2019-12-03T08:22:07.6404715Z .................................................................................................... 6200/9320
2019-12-03T08:22:07.6404715Z .................................................................................................... 6200/9320
2019-12-03T08:22:20.2034722Z ........................i..ii....................................................................... 6300/9320
2019-12-03T08:22:38.6393829Z ...............................................................................................i.... 6500/9320
2019-12-03T08:22:40.8250631Z .................................................................................................... 6600/9320
2019-12-03T08:22:42.9001651Z ......................................................................................i............. 6700/9320
2019-12-03T08:22:45.5033974Z .................................................................................................... 6800/9320
---
2019-12-03T08:24:16.4516278Z .................................................................................................... 7300/9320
2019-12-03T08:24:21.3744032Z .................................................................................................... 7400/9320
2019-12-03T08:24:27.0137932Z .................................................................................................... 7500/9320
2019-12-03T08:24:33.3574124Z .................................................................................................... 7600/9320
2019-12-03T08:24:44.8182986Z ...................................................................................................i 7700/9320
2019-12-03T08:24:51.5751092Z iii................................................................................................. 7800/9320
2019-12-03T08:25:00.2740372Z ............................ii......i............................................................... 7900/9320
2019-12-03T08:25:16.4243284Z .................................................................................................... 8100/9320
2019-12-03T08:25:27.9192093Z .................................................................................................... 8200/9320
2019-12-03T08:25:34.0638391Z .................................................................................................... 8300/9320
2019-12-03T08:25:57.6266559Z .................................................................................................... 8400/9320
---
2019-12-03T08:27:20.6340636Z 
2019-12-03T08:27:20.6341530Z ---- [ui] ui/issues/issue-66923-show-error-for-correct-call.rs stdout ----
2019-12-03T08:27:20.6341859Z diff of stderr:
2019-12-03T08:27:20.6342031Z 
2019-12-03T08:27:20.6342235Z 1 error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2019-12-03T08:27:20.6342705Z -   --> $DIR/issue-66923.rs:6:39
2019-12-03T08:27:20.6343171Z +   --> $DIR/issue-66923-show-error-for-correct-call.rs:8:39
2019-12-03T08:27:20.6343414Z 3    |
2019-12-03T08:27:20.6343626Z 4 LL |     let x2: Vec<f64> = x1.into_iter().collect();
2019-12-03T08:27:20.6343999Z 5    |                                       ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
2019-12-03T08:27:20.6344172Z 
2019-12-03T08:27:20.6344395Z 7    = help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec<f64>`
2019-12-03T08:27:20.6344586Z 8 
2019-12-03T08:27:20.6344798Z 9 error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2019-12-03T08:27:20.6345201Z -   --> $DIR/issue-66923.rs:10:29
2019-12-03T08:27:20.6345843Z +   --> $DIR/issue-66923-show-error-for-correct-call.rs:12:29
2019-12-03T08:27:20.6346110Z 11    |
2019-12-03T08:27:20.6346309Z 12 LL |     let x3 = x1.into_iter().collect::<Vec<f64>>();
2019-12-03T08:27:20.6346632Z 13    |                             ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
2019-12-03T08:27:20.6347165Z 
2019-12-03T08:27:20.6347373Z The actual stderr differed from the expected stderr.
2019-12-03T08:27:20.6347373Z The actual stderr differed from the expected stderr.
2019-12-03T08:27:20.6347892Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-66923-show-error-for-correct-call/issue-66923-show-error-for-correct-call.stderr
2019-12-03T08:27:20.6348382Z To update references, rerun the tests and pass the `--bless` flag
2019-12-03T08:27:20.6348942Z To only update this specific test, also pass `--test-args issues/issue-66923-show-error-for-correct-call.rs`
2019-12-03T08:27:20.6349416Z error: 1 errors occurred comparing output.
2019-12-03T08:27:20.6349614Z status: exit code: 1
2019-12-03T08:27:20.6349614Z status: exit code: 1
2019-12-03T08:27:20.6350637Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-66923-show-error-for-correct-call.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-66923-show-error-for-correct-call" "-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-66923-show-error-for-correct-call/auxiliary" "-A" "unused"
2019-12-03T08:27:20.6351391Z ------------------------------------------
2019-12-03T08:27:20.6351830Z 
2019-12-03T08:27:20.6352256Z ------------------------------------------
2019-12-03T08:27:20.6352511Z stderr:
2019-12-03T08:27:20.6352511Z stderr:
2019-12-03T08:27:20.6352897Z ------------------------------------------
2019-12-03T08:27:20.6353141Z error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2019-12-03T08:27:20.6353869Z   --> /checkout/src/test/ui/issues/issue-66923-show-error-for-correct-call.rs:8:39
2019-12-03T08:27:20.6354222Z    |
2019-12-03T08:27:20.6354459Z LL |     let x2: Vec<f64> = x1.into_iter().collect();
2019-12-03T08:27:20.6354681Z    |                                       ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
2019-12-03T08:27:20.6354870Z    |
2019-12-03T08:27:20.6355082Z    = help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec<f64>`
2019-12-03T08:27:20.6355252Z 
2019-12-03T08:27:20.6355441Z error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2019-12-03T08:27:20.6355913Z   --> /checkout/src/test/ui/issues/issue-66923-show-error-for-correct-call.rs:12:29
2019-12-03T08:27:20.6356150Z    |
2019-12-03T08:27:20.6356336Z LL |     let x3 = x1.into_iter().collect::<Vec<f64>>();
2019-12-03T08:27:20.6356565Z    |                             ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
2019-12-03T08:27:20.6356755Z    |
2019-12-03T08:27:20.6356957Z    = help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec<f64>`
2019-12-03T08:27:20.6357304Z error: aborting due to 2 previous errors
2019-12-03T08:27:20.6357462Z 
2019-12-03T08:27:20.6357890Z For more information about this error, try `rustc --explain E0277`.
2019-12-03T08:27:20.6358103Z 
---
2019-12-03T08:27:20.6380540Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-12-03T08:27:20.6380936Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-03T08:27:20.6396966Z 
2019-12-03T08:27:20.6401880Z 
2019-12-03T08:27:20.6403713Z 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-12-03T08:27:20.6404525Z 
2019-12-03T08:27:20.6404635Z 
2019-12-03T08:27:20.6407093Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-03T08:27:20.6407273Z Build completed unsuccessfully in 0:59:30
2019-12-03T08:27:20.6407273Z Build completed unsuccessfully in 0:59:30
2019-12-03T08:27:20.6452735Z == clock drift check ==
2019-12-03T08:27:20.6466057Z   local time: Tue Dec  3 08:27:20 UTC 2019
2019-12-03T08:27:20.9246731Z   network time: Tue, 03 Dec 2019 08:27:20 GMT
2019-12-03T08:27:20.9248217Z == end clock drift check ==
2019-12-03T08:27:21.7463341Z 
2019-12-03T08:27:21.7556587Z ##[error]Bash exited with code '1'.
2019-12-03T08:27:21.7590643Z ##[section]Starting: Checkout
2019-12-03T08:27:21.7592423Z ==============================================================================
2019-12-03T08:27:21.7592495Z Task         : Get sources
2019-12-03T08:27:21.7592540Z 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-12-03T09:14:05.1023910Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-03T09:14:05.1237491Z ##[command]git config gc.auto 0
2019-12-03T09:14:05.1306502Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-03T09:14:05.1364786Z ##[command]git config --get-all http.proxy
2019-12-03T09:14:05.1547037Z ##[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/66933/merge:refs/remotes/pull/66933/merge
---
2019-12-03T10:14:33.2292649Z .................................................................................................... 1600/9320
2019-12-03T10:14:37.9993184Z .................................................................................................... 1700/9320
2019-12-03T10:14:50.9502170Z ........................................i........................................................... 1800/9320
2019-12-03T10:14:59.0827270Z .................................................................................................... 1900/9320
2019-12-03T10:15:13.0881405Z .........................iiiii...................................................................... 2000/9320
2019-12-03T10:15:23.5710034Z .................................................................................................... 2200/9320
2019-12-03T10:15:26.1850215Z .................................................................................................... 2300/9320
2019-12-03T10:15:30.8689095Z .................................................................................................... 2400/9320
2019-12-03T10:15:53.0880481Z .................................................................................................... 2500/9320
---
2019-12-03T10:18:37.2579773Z ..........................i...............i......................................................... 4800/9320
2019-12-03T10:18:48.8771231Z .................................................................................................... 4900/9320
2019-12-03T10:18:54.2618472Z .................................................................................................... 5000/9320
2019-12-03T10:19:02.5871796Z ...............................F.................................................................... 5100/9320
2019-12-03T10:19:10.4172563Z .................................ii.ii...........i.................................................. 5200/9320
2019-12-03T10:19:20.2274026Z .................................................................................................... 5400/9320
2019-12-03T10:19:30.3412049Z .................................................................................................... 5500/9320
2019-12-03T10:19:37.8273006Z ...............i.................................................................................... 5600/9320
2019-12-03T10:19:44.1014526Z .................................................................................................... 5700/9320
2019-12-03T10:19:44.1014526Z .................................................................................................... 5700/9320
2019-12-03T10:19:55.9386436Z .................................................................................................... 5800/9320
2019-12-03T10:20:08.4128039Z .ii...i..ii...........i............................................................................. 5900/9320
2019-12-03T10:20:26.9949068Z .................................................................................................... 6100/9320
2019-12-03T10:20:33.0105637Z .................................................................................................... 6200/9320
2019-12-03T10:20:33.0105637Z .................................................................................................... 6200/9320
2019-12-03T10:20:47.2301000Z ........................i..ii....................................................................... 6300/9320
2019-12-03T10:21:07.5335384Z ...............................................................................................i.... 6500/9320
2019-12-03T10:21:09.8819384Z .................................................................................................... 6600/9320
2019-12-03T10:21:12.2241948Z ......................................................................................i............. 6700/9320
2019-12-03T10:21:14.9709469Z .................................................................................................... 6800/9320
---
2019-12-03T10:26:10.3970105Z 
2019-12-03T10:26:10.3970974Z ---- [ui] ui/issues/issue-66923-show-error-for-correct-call.rs stdout ----
2019-12-03T10:26:10.3971462Z diff of stderr:
2019-12-03T10:26:10.3971690Z 
2019-12-03T10:26:10.3971909Z 1 error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2019-12-03T10:26:10.3972421Z -   --> $DIR/issue-66923-show-error-for-correct-call.rs:6:39
2019-12-03T10:26:10.3973096Z +   --> $DIR/issue-66923-show-error-for-correct-call.rs:8:39
2019-12-03T10:26:10.3973555Z 3    |
2019-12-03T10:26:10.3973768Z 4 LL |     let x2: Vec<f64> = x1.into_iter().collect();
2019-12-03T10:26:10.3974400Z 5    |                                       ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
2019-12-03T10:26:10.3974618Z 
2019-12-03T10:26:10.3974870Z 7    = help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec<f64>`
2019-12-03T10:26:10.3975092Z 8 
2019-12-03T10:26:10.3975321Z 9 error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2019-12-03T10:26:10.3975830Z -   --> $DIR/issue-66923-show-error-for-correct-call.rs:10:29
2019-12-03T10:26:10.3976701Z +   --> $DIR/issue-66923-show-error-for-correct-call.rs:12:29
2019-12-03T10:26:10.3977332Z 11    |
2019-12-03T10:26:10.3977563Z 12 LL |     let x3 = x1.into_iter().collect::<Vec<f64>>();
2019-12-03T10:26:10.3978226Z 13    |                             ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
2019-12-03T10:26:10.3978666Z 
2019-12-03T10:26:10.3978906Z The actual stderr differed from the expected stderr.
2019-12-03T10:26:10.3978906Z The actual stderr differed from the expected stderr.
2019-12-03T10:26:10.3979552Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-66923-show-error-for-correct-call/issue-66923-show-error-for-correct-call.stderr
2019-12-03T10:26:10.3980126Z To update references, rerun the tests and pass the `--bless` flag
2019-12-03T10:26:10.3980762Z To only update this specific test, also pass `--test-args issues/issue-66923-show-error-for-correct-call.rs`
2019-12-03T10:26:10.3981292Z error: 1 errors occurred comparing output.
2019-12-03T10:26:10.3981650Z status: exit code: 1
2019-12-03T10:26:10.3981650Z status: exit code: 1
2019-12-03T10:26:10.3982835Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-66923-show-error-for-correct-call.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-66923-show-error-for-correct-call" "-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-66923-show-error-for-correct-call/auxiliary" "-A" "unused"
2019-12-03T10:26:10.3983591Z ------------------------------------------
2019-12-03T10:26:10.3983829Z 
2019-12-03T10:26:10.3984280Z ------------------------------------------
2019-12-03T10:26:10.3986790Z stderr:
2019-12-03T10:26:10.3986790Z stderr:
2019-12-03T10:26:10.3987098Z ------------------------------------------
2019-12-03T10:26:10.3987156Z error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2019-12-03T10:26:10.3987454Z   --> /checkout/src/test/ui/issues/issue-66923-show-error-for-correct-call.rs:8:39
2019-12-03T10:26:10.3987508Z    |
2019-12-03T10:26:10.3987971Z LL |     let x2: Vec<f64> = x1.into_iter().collect();
2019-12-03T10:26:10.3988228Z    |                                       ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
2019-12-03T10:26:10.3988295Z    |
2019-12-03T10:26:10.3988368Z    = help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec<f64>`
2019-12-03T10:26:10.3988406Z 
2019-12-03T10:26:10.3988459Z error[E0277]: a collection of type `std::vec::Vec<f64>` cannot be built from an iterator over elements of type `&f64`
2019-12-03T10:26:10.3988800Z   --> /checkout/src/test/ui/issues/issue-66923-show-error-for-correct-call.rs:12:29
2019-12-03T10:26:10.3988871Z    |
2019-12-03T10:26:10.3988918Z LL |     let x3 = x1.into_iter().collect::<Vec<f64>>();
2019-12-03T10:26:10.3988988Z    |                             ^^^^^^^ a collection of type `std::vec::Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
2019-12-03T10:26:10.3989056Z    |
2019-12-03T10:26:10.3989115Z    = help: the trait `std::iter::FromIterator<&f64>` is not implemented for `std::vec::Vec<f64>`
2019-12-03T10:26:10.3989214Z error: aborting due to 2 previous errors
2019-12-03T10:26:10.3989244Z 
2019-12-03T10:26:10.3989495Z For more information about this error, try `rustc --explain E0277`.
2019-12-03T10:26:10.3989533Z 
---
2019-12-03T10:26:10.4009897Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-12-03T10:26:10.4009987Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-03T10:26:10.4030371Z 
2019-12-03T10:26:10.4030496Z 
2019-12-03T10:26:10.4033030Z 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-12-03T10:26:10.4033294Z 
2019-12-03T10:26:10.4033323Z 
2019-12-03T10:26:10.4037329Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-03T10:26:10.4066258Z Build completed unsuccessfully in 1:05:51
2019-12-03T10:26:10.4066258Z Build completed unsuccessfully in 1:05:51
2019-12-03T10:26:10.4090538Z == clock drift check ==
2019-12-03T10:26:10.4106013Z   local time: Tue Dec  3 10:26:10 UTC 2019
2019-12-03T10:26:10.6881747Z   network time: Tue, 03 Dec 2019 10:26:10 GMT
2019-12-03T10:26:10.6888452Z == end clock drift check ==
2019-12-03T10:26:11.5280759Z 
2019-12-03T10:26:11.5346154Z ##[error]Bash exited with code '1'.
2019-12-03T10:26:11.5380231Z ##[section]Starting: Checkout
2019-12-03T10:26:11.5382068Z ==============================================================================
2019-12-03T10:26:11.5382118Z Task         : Get sources
2019-12-03T10:26:11.5382178Z 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)

@VirrageS VirrageS force-pushed the blame-wrong-line branch 2 times, most recently from d9f8d5b to 0abb988 Compare December 3, 2019 10:46
@estebank
Copy link
Contributor

estebank commented Dec 3, 2019

@bors r=Centril

@bors
Copy link
Contributor

bors commented Dec 3, 2019

📌 Commit 0abb988 has been approved by Centril

JohnTitor added a commit to JohnTitor/rust that referenced this pull request Dec 5, 2019
Fix pointing at arg when cause is outside of call

Closes: rust-lang#66923
@JohnTitor
Copy link
Member

Seems failed in #67042 (comment)
@bors r-

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 5, 2019
@tesuji
Copy link
Contributor

tesuji commented Dec 5, 2019

@JohnTitor I think it shall be #66764.

@JohnTitor
Copy link
Member

@lzutao Indeed! So rebase will be needed once it is merged.

@tesuji
Copy link
Contributor

tesuji commented Dec 6, 2019

@VirrageS You might want to rebase against latest master and bless the test.

@VirrageS
Copy link
Contributor Author

VirrageS commented Dec 6, 2019

@lzutao done :)

@estebank
Copy link
Contributor

estebank commented Dec 6, 2019

@bors r=Centril

@bors
Copy link
Contributor

bors commented Dec 6, 2019

📌 Commit e2e4801 has been approved by Centril

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 6, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 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-12-06T16:20:56.3512939Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-06T16:20:56.3753728Z ##[command]git config gc.auto 0
2019-12-06T16:20:56.3831424Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-06T16:20:56.3892946Z ##[command]git config --get-all http.proxy
2019-12-06T16:20:56.4038053Z ##[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/66933/merge:refs/remotes/pull/66933/merge
---
2019-12-06T17:19:16.4283773Z .................................................................................................... 1600/9328
2019-12-06T17:19:20.9910183Z .................................................................................................... 1700/9328
2019-12-06T17:19:32.9349815Z ...........................................i........................................................ 1800/9328
2019-12-06T17:19:40.7420937Z .................................................................................................... 1900/9328
2019-12-06T17:19:54.5364761Z ............................iiiii................................................................... 2000/9328
2019-12-06T17:20:04.4871256Z .................................................................................................... 2200/9328
2019-12-06T17:20:06.9705868Z .................................................................................................... 2300/9328
2019-12-06T17:20:11.4170086Z .................................................................................................... 2400/9328
2019-12-06T17:20:32.5355172Z .................................................................................................... 2500/9328
---
2019-12-06T17:23:06.7166547Z .............................i...............i...................................................... 4800/9328
2019-12-06T17:23:16.4137335Z .................................................................................................... 4900/9328
2019-12-06T17:23:22.9091866Z .................................................................................................... 5000/9328
2019-12-06T17:23:28.8504088Z .................................................................................................... 5100/9328
2019-12-06T17:23:37.9361264Z .......................................ii.ii...........i............................................ 5200/9328
2019-12-06T17:23:47.2179464Z .................................................................................................... 5400/9328
2019-12-06T17:23:56.7107604Z .................................................................................................... 5500/9328
2019-12-06T17:24:03.9943794Z .....................i.............................................................................. 5600/9328
2019-12-06T17:24:09.9157589Z .................................................................................................... 5700/9328
2019-12-06T17:24:09.9157589Z .................................................................................................... 5700/9328
2019-12-06T17:24:21.1625575Z .................................................................................................... 5800/9328
2019-12-06T17:24:32.5239240Z .......ii...i..ii...........i....................................................................... 5900/9328
2019-12-06T17:24:49.6929785Z .................................................................................................... 6100/9328
2019-12-06T17:24:56.0555742Z .................................................................................................... 6200/9328
2019-12-06T17:24:56.0555742Z .................................................................................................... 6200/9328
2019-12-06T17:25:09.4130660Z ..............................i..ii................................................................. 6300/9328
2019-12-06T17:25:29.3789271Z .................................................................................................... 6500/9328
2019-12-06T17:25:31.4243881Z ..i................................................................................................. 6600/9328
2019-12-06T17:25:33.5728770Z ..............................................................................................i..... 6700/9328
2019-12-06T17:25:36.1911656Z .................................................................................................... 6800/9328
---
2019-12-06T17:27:11.8880721Z .................................................................................................... 7400/9328
2019-12-06T17:27:17.0730859Z .................................................................................................... 7500/9328
2019-12-06T17:27:23.4368355Z .................................................................................................... 7600/9328
2019-12-06T17:27:34.2004400Z .................................................................................................... 7700/9328
2019-12-06T17:27:40.2503812Z .......iiii......................................................................................... 7800/9328
2019-12-06T17:27:54.9727558Z .................................................................................................... 8000/9328
2019-12-06T17:28:06.0669464Z .................................................................................................... 8100/9328
2019-12-06T17:28:18.1459553Z .................................................................................................... 8200/9328
2019-12-06T17:28:24.4140927Z .................................................................................................... 8300/9328
---
2019-12-06T17:30:16.0417838Z ---- [ui] ui/const-generics/array-impls/core-traits-no-impls-length-33.rs stdout ----
2019-12-06T17:30:16.0418072Z diff of stderr:
2019-12-06T17:30:16.0418194Z 
2019-12-06T17:30:16.0418321Z 15    |
2019-12-06T17:30:16.0418528Z 16    = note: required because of the requirements on the impl of `std::cmp::Eq` for `[usize; 33]`
2019-12-06T17:30:16.0418796Z + error[E0277]: arrays only have std trait implementations for lengths 0..=32
2019-12-06T17:30:16.0419183Z +   --> $DIR/core-traits-no-impls-length-33.rs:8:19
2019-12-06T17:30:16.0419339Z +    |
2019-12-06T17:30:16.0419488Z + LL |     let mut set = HashSet::new();
2019-12-06T17:30:16.0419488Z + LL |     let mut set = HashSet::new();
2019-12-06T17:30:16.0419625Z +    |                   ^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[usize; 33]`
2019-12-06T17:30:16.0419754Z +    |
2019-12-06T17:30:16.0419901Z +    = note: required because of the requirements on the impl of `std::cmp::Eq` for `[usize; 33]`
2019-12-06T17:30:16.0420034Z +    = note: required by `std::collections::HashSet::<T>::new`
2019-12-06T17:30:16.0420302Z 18 error[E0369]: binary operation `==` cannot be applied to type `[usize; 33]`
2019-12-06T17:30:16.0420637Z 19   --> $DIR/core-traits-no-impls-length-33.rs:14:19
2019-12-06T17:30:16.0421005Z 20    |
2019-12-06T17:30:16.0421151Z 
2019-12-06T17:30:16.0421151Z 
2019-12-06T17:30:16.0422001Z 48              <&'a mut [T] as std::iter::IntoIterator>
2019-12-06T17:30:16.0422389Z 50 
2019-12-06T17:30:16.0422744Z - error: aborting due to 5 previous errors
2019-12-06T17:30:16.0422918Z + error: aborting due to 6 previous errors
2019-12-06T17:30:16.0423080Z 52 
2019-12-06T17:30:16.0423080Z 52 
2019-12-06T17:30:16.0423221Z 53 Some errors have detailed explanations: E0277, E0369.
2019-12-06T17:30:16.0423621Z 54 For more information about an error, try `rustc --explain E0277`.
2019-12-06T17:30:16.0423780Z 
2019-12-06T17:30:16.0423901Z 
2019-12-06T17:30:16.0424044Z The actual stderr differed from the expected stderr.
2019-12-06T17:30:16.0424552Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/core-traits-no-impls-length-33/core-traits-no-impls-length-33.stderr
2019-12-06T17:30:16.0425276Z To update references, rerun the tests and pass the `--bless` flag
2019-12-06T17:30:16.0425782Z To only update this specific test, also pass `--test-args const-generics/array-impls/core-traits-no-impls-length-33.rs`
2019-12-06T17:30:16.0426559Z error: 1 errors occurred comparing output.
2019-12-06T17:30:16.0427234Z status: exit code: 1
2019-12-06T17:30:16.0427234Z status: exit code: 1
2019-12-06T17:30:16.0428306Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.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/const-generics/array-impls/core-traits-no-impls-length-33" "-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/const-generics/array-impls/core-traits-no-impls-length-33/auxiliary" "-A" "unused"
2019-12-06T17:30:16.0428952Z ------------------------------------------
2019-12-06T17:30:16.0429131Z 
2019-12-06T17:30:16.0429494Z ------------------------------------------
2019-12-06T17:30:16.0429661Z stderr:
2019-12-06T17:30:16.0429661Z stderr:
2019-12-06T17:30:16.0430020Z ------------------------------------------
2019-12-06T17:30:16.0430198Z error[E0277]: arrays only have std trait implementations for lengths 0..=32
2019-12-06T17:30:16.0430785Z   --> /checkout/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs:2:22
2019-12-06T17:30:16.0430972Z    |
2019-12-06T17:30:16.0431095Z LL |     println!("{:?}", [0_usize; 33]);
2019-12-06T17:30:16.0431246Z    |                      ^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[usize; 33]`
2019-12-06T17:30:16.0431933Z    = note: required because of the requirements on the impl of `std::fmt::Debug` for `[usize; 33]`
2019-12-06T17:30:16.0432119Z    = note: required by `std::fmt::Debug::fmt`
2019-12-06T17:30:16.0432252Z 
2019-12-06T17:30:16.0432399Z error[E0277]: arrays only have std trait implementations for lengths 0..=32
2019-12-06T17:30:16.0432399Z error[E0277]: arrays only have std trait implementations for lengths 0..=32
2019-12-06T17:30:16.0432867Z   --> /checkout/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs:9:16
2019-12-06T17:30:16.0433047Z    |
2019-12-06T17:30:16.0433186Z LL |     set.insert([0_usize; 33]);
2019-12-06T17:30:16.0433381Z    |                ^^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[usize; 33]`
2019-12-06T17:30:16.0433524Z    |
2019-12-06T17:30:16.0433689Z    = note: required because of the requirements on the impl of `std::cmp::Eq` for `[usize; 33]`
2019-12-06T17:30:16.0433960Z error[E0277]: arrays only have std trait implementations for lengths 0..=32
2019-12-06T17:30:16.0434588Z   --> /checkout/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs:8:19
2019-12-06T17:30:16.0436686Z    |
2019-12-06T17:30:16.0437109Z LL |     let mut set = HashSet::new();
2019-12-06T17:30:16.0437109Z LL |     let mut set = HashSet::new();
2019-12-06T17:30:16.0437303Z    |                   ^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[usize; 33]`
2019-12-06T17:30:16.0437435Z    |
2019-12-06T17:30:16.0437565Z    = note: required because of the requirements on the impl of `std::cmp::Eq` for `[usize; 33]`
2019-12-06T17:30:16.0437714Z    = note: required by `std::collections::HashSet::<T>::new`
2019-12-06T17:30:16.0437947Z error[E0369]: binary operation `==` cannot be applied to type `[usize; 33]`
2019-12-06T17:30:16.0438421Z   --> /checkout/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs:14:19
2019-12-06T17:30:16.0438590Z    |
2019-12-06T17:30:16.0438590Z    |
2019-12-06T17:30:16.0438712Z LL |     [0_usize; 33] == [1_usize; 33]
2019-12-06T17:30:16.0439159Z    |     ------------- ^^ ------------- [usize; 33]
2019-12-06T17:30:16.0439458Z    |     [usize; 33]
2019-12-06T17:30:16.0439591Z    |
2019-12-06T17:30:16.0439825Z    = note: an implementation of `std::cmp::PartialEq` might be missing for `[usize; 33]`
2019-12-06T17:30:16.0439999Z 
2019-12-06T17:30:16.0439999Z 
2019-12-06T17:30:16.0440130Z error[E0369]: binary operation `<` cannot be applied to type `[usize; 33]`
2019-12-06T17:30:16.0440518Z   --> /checkout/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs:19:19
2019-12-06T17:30:16.0440695Z    |
2019-12-06T17:30:16.0440816Z LL |     [0_usize; 33] < [1_usize; 33]
2019-12-06T17:30:16.0441849Z    |     ------------- ^ ------------- [usize; 33]
2019-12-06T17:30:16.0442869Z    |     [usize; 33]
2019-12-06T17:30:16.0442911Z    |
2019-12-06T17:30:16.0442911Z    |
2019-12-06T17:30:16.0442979Z    = note: an implementation of `std::cmp::PartialOrd` might be missing for `[usize; 33]`
2019-12-06T17:30:16.0443013Z 
2019-12-06T17:30:16.0443062Z error[E0277]: the trait bound `&[usize; 33]: std::iter::IntoIterator` is not satisfied
2019-12-06T17:30:16.0443438Z   --> /checkout/src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs:24:14
2019-12-06T17:30:16.0443501Z    |
2019-12-06T17:30:16.0443551Z LL |     for _ in &[0_usize; 33] {
2019-12-06T17:30:16.0443603Z    |              ^^^^^^^^^^^^^^ the trait `std::iter::IntoIterator` is not implemented for `&[usize; 33]`
2019-12-06T17:30:16.0443712Z    = help: the following implementations were found:
2019-12-06T17:30:16.0443712Z    = help: the following implementations were found:
2019-12-06T17:30:16.0443950Z              <&'a [T; _] as std::iter::IntoIterator>
2019-12-06T17:30:16.0444195Z              <&'a [T] as std::iter::IntoIterator>
2019-12-06T17:30:16.0444428Z              <&'a mut [T; _] as std::iter::IntoIterator>
2019-12-06T17:30:16.0444825Z              <&'a mut [T] as std::iter::IntoIterator>
2019-12-06T17:30:16.0444912Z 
2019-12-06T17:30:16.0444949Z error: aborting due to 6 previous errors
2019-12-06T17:30:16.0444973Z 
2019-12-06T17:30:16.0445028Z Some errors have detailed explanations: E0277, E0369.
---
2019-12-06T17:30:16.0446439Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-12-06T17:30:16.0446488Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-06T17:30:16.0450311Z 
2019-12-06T17:30:16.0450369Z 
2019-12-06T17:30:16.0453529Z 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-7/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" "7.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-12-06T17:30:16.0453871Z 
2019-12-06T17:30:16.0453918Z 
2019-12-06T17:30:16.0550707Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-06T17:30:16.0550800Z Build completed unsuccessfully in 1:03:13
2019-12-06T17:30:16.0550800Z Build completed unsuccessfully in 1:03:13
2019-12-06T17:30:16.0597259Z == clock drift check ==
2019-12-06T17:30:16.0613627Z   local time: Fri Dec  6 17:30:16 UTC 2019
2019-12-06T17:30:16.6150949Z   network time: Fri, 06 Dec 2019 17:30:16 GMT
2019-12-06T17:30:16.6162214Z == end clock drift check ==
2019-12-06T17:30:17.6280691Z 
2019-12-06T17:30:17.6430068Z ##[error]Bash exited with code '1'.
2019-12-06T17:30:17.6463400Z ##[section]Starting: Checkout
2019-12-06T17:30:17.6465474Z ==============================================================================
2019-12-06T17:30:17.6465533Z Task         : Get sources
2019-12-06T17:30:17.6465587Z 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)

@estebank
Copy link
Contributor

estebank commented Dec 6, 2019

@bors r-

@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 Dec 6, 2019
@VirrageS
Copy link
Contributor Author

VirrageS commented Dec 6, 2019

src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs seems to fail and I don't think I know how to fix it. Mostly because from similar code we expect different behaviour:

fn foo() {
    let mut set = HashSet::new(); // don't point here!
    set.insert([0_usize; 33]); // <- point here
}

here we have 2 errors. One is connected to argument itself [0_usize; 33] and the second one (I think) is connected to coerced type of hash set which tries to be HashSet<[0_usize; 33]> and because it cannot be created (because of std::array::LengthAtMost32 trait constraints) we have an error. With current implementation we point both errors to argument (which is good) so they collapse into single one that is reported but with my implementation we have two different errors where one of them (the one which points to 2nd line) can be very confusing.

fn foo() {
    let v = vec![1_f64, 2.2_f64];
    let mut fft: Vec<Vec<f64>> = vec![];

    let x1: &[f64] = &v;
    let x2 = x1.into_iter().collect::<Vec<f64>>(); // <- point here
    fft.push(x2); // don't point here!
}

But here we also have similar situation but now we don't want to point to argument but rather to type mismatch which happens where we want to create Vec<f64> out of [&64].

@VirrageS
Copy link
Contributor Author

VirrageS commented Dec 6, 2019

Since I don't have enough knowledge to even try to fix these discrepancies I'm closing this MR.

@VirrageS VirrageS closed this Dec 6, 2019
@VirrageS
Copy link
Contributor Author

VirrageS commented Dec 6, 2019

The only question is why it worked/compiled before since src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs is pretty old stuff?

@tesuji
Copy link
Contributor

tesuji commented Dec 7, 2019

Wouldn't you also bless that test src/test/ui/const-generics/array-impls/core-traits-no-impls-length-33.rs is better?

@VirrageS
Copy link
Contributor Author

VirrageS commented Dec 7, 2019

The changes are not showing up after I closed the MR but you can check stderr for the blessed test here: VirrageS@e305bf8#diff-83c38304ce39064b906661170076d85e

		 error[E0277]: arrays only have std trait implementations for lengths 0..=32
   --> $DIR/core-traits-no-impls-length-33.rs:8:19
    |
 LL |     let mut set = HashSet::new();
    |                   ^^^^^^^^^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[usize; 33]`
    |
    = note: required because of the requirements on the impl of `std::cmp::Eq` for `[usize; 33]`
    = note: required by `std::collections::HashSet::<T>::new`

This is rather confusing than helpful :C

@estebank
Copy link
Contributor

I do think that the new output in that file is not optimal, but good enough for the change to land, because it isn't misleading, just verbose.

@VirrageS
Copy link
Contributor Author

I can definitelly reopen the new MR (I cannot reopen this for some reason), maybe we can start a new discussion there. I will do that later today.

@estebank
Copy link
Contributor

(I cannot reopen this for some reason)

Github doesn't let you reopen a pull request that has been closed and then has had it's source branch updated.

@VirrageS
Copy link
Contributor Author

I see :( I've reopened it here: #67354

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Dec 19, 2019
Fix pointing at arg when cause is outside of call

Follow up after: rust-lang#66933

Closes: rust-lang#66923

r? @estebank
Centril added a commit to Centril/rust that referenced this pull request Dec 20, 2019
Fix pointing at arg when cause is outside of call

Follow up after: rust-lang#66933

Closes: rust-lang#66923

r? @estebank
Centril added a commit to Centril/rust that referenced this pull request Dec 20, 2019
Fix pointing at arg when cause is outside of call

Follow up after: rust-lang#66933

Closes: rust-lang#66923

r? @estebank
@eddyb
Copy link
Member

eddyb commented Jan 16, 2020

Github doesn't let you reopen a pull request that has been closed and then has had it's source branch updated.

For future reference, you can fix this by force-pushing the previous commit (I believe the syntax is git push -f origin e2e4801:blame-wrong-line), reopening the PR, then force-pushing your changes.

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.

Error message blames wrong line
8 participants