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

resolve where clauses in types in impls #53748

Closed
wants to merge 2 commits into from

Conversation

nikomatsakis
Copy link
Contributor

Fixes #47206

cc @sunjay

@rust-highfive
Copy link
Collaborator

r? @michaelwoerister

(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 Aug 27, 2018
@sunjay
Copy link
Member

sunjay commented Aug 27, 2018

LGTM. Thanks for looking into this! 😄

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

r=me, feel free to disregard the nitpick

@@ -0,0 +1,27 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
Copy link
Contributor

Choose a reason for hiding this comment

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

2018

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that #53617 was merged I think the copyright notice can just be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I confess that I hate those licenses so much I make a point of leaving the Copyright year untouched (it doesn't matter a whit legally, from what I understand).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woah, I knew nothing about #53617!

@nikomatsakis
Copy link
Contributor Author

@bors r=estebank

@bors
Copy link
Contributor

bors commented Aug 27, 2018

📌 Commit 23372af has been approved by estebank

@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 Aug 27, 2018
@rust-highfive
Copy link
Collaborator

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

Click to expand the log.
[00:46:00] ....................................................................................................
[00:46:02] ....................................................................................................
[00:46:05] ....................................................................................................
[00:46:08] ....................................................................................................
[00:46:12] ........i.F.........................................................................................
[00:46:19] ........i...........................................................................................
[00:46:22] .............ii.iii.................................................................................
[00:46:25] ....................................................................................................
[00:46:25] ....................................................................................................
[00:46:27] .......................................................FF...........................................
[00:46:29] ....................................................................................................
[00:46:32] ..............F.....................................................................................
[00:46:37] ...............................................................i....................................
[00:46:37] ...............................................................i....................................
[00:46:40] ..............................................F.....................................................
[00:46:45] ...............................................i....................................................
[00:46:48] ....................................................................................................
[00:46:48] ....................................................................................................
[00:46:52] .................F..................................................................................
[00:46:57] ....................................................................................................
[00:47:00] ....................................................................................................
[00:47:04] ....................................................................................................
[00:47:06] ....................................................................................................
[00:47:06] ....................................................................................................
[00:47:10] ....................................................................................................
[00:47:13] .......................................i..............................F.............................
[00:47:19] ....................................................................................................
[00:47:19] ....................................................................................................
[00:47:22] .........................................................................FF......................i..
[00:47:28] ....................................................................................................
[00:47:31] ....................................................................................................
[00:47:31] ....................................................................................................
[00:47:34] ...........................................................FF..F.F.....FF...................F....F..
[00:47:37] .F...........................i.........................................F......F.....................
[00:47:40] ....................................................................................................
[00:47:43] .........F..........................................................................................
[00:47:47] ...............................................................i...........................F........
[00:47:50] .........................F..........................................................................
[00:47:55] ....................................................................................................
tests/two_files/auxiliary" "-A" "unused"
[00:47:57] stdout:
[00:47:57] ------------------------------------------
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"expected trait, found type alias `Bar`","code":{"code":"E0404","explanation":"\nYou tried to use something which is not a trait in a trait position, such as\na bound or `impl`.\n\nErroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\nstruct Bar;\n\nimpl Foo for Bar {} // error: `Foo` is not a trait\n```\n\nAnother erroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\n\nfn bar<T: Foo>(t: T) {} // error: `Foo` is not a trait\n```\n\nPlease verify that you didn't misspell the trait's name or otherwise use the\nwrong identifier. Example:\n\n```\ntrait Foo {\n    // some functions\n}\nstruct Bar;\n\nimpl Foo for Bar { // ok!\n    // functions implementation\n}\n```\n\nor\n\n```\ntrait Foo {\n    // some functions\n}\n\nfn bar<T: Foo>(t: T) {} // ok!\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/codemap_tests/two_files.rs","byte_start":520,"byte_end":523,"line_start":15,"line_end":15,"column_start":6,"column_end":9,"is_primary":true,"text":[{"text":"impl Bar for Baz { } //~ ERROR expected trait, found type alias","highlight_start":6,"highlight_end":9}],"label":"type aliases cannot be used for traits","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0404]: expected trait, found type alias `Bar`\n  --> /checkout/src/test/ui/codemap_tests/two_files.rs:15:6\n   |\nLL | impl Bar for Baz { } //~ ERROR expected trait, found type alias\n   |      ^^^ type aliases cannot be used for traits\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:57] {"message":"For more information about this error, try `rustc --explain E0404`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0404`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/codemap_tests/two_files.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/codemap_tests/two_files.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] 
[00:47:57] ---- [ui] ui/error-codes/E0404.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0404.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0404/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0404/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"expected trait, found struct `Foo`","code":{"code":"E0404","explanation":"\nYou tried to use something which is not a trait in a trait position, such as\na bound or `impl`.\n\nErroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\nstruct Bar;\n\nimpl Foo for Bar {} // error: `Foo` is not a trait\n```\n\nAnother erroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\n\nfn bar<T: Foo>(t: T) {} // error: `Foo` is not a trait\n```\n\nPlease verify that you didn't misspell the trait's name or otherwise use the\nwrong identifier. Example:\n\n```\ntrait Foo {\n    // some functions\n}\nstruct Bar;\n\nimpl Foo for Bar { // ok!\n    // functions implementation\n}\n```\n\nor\n\n```\ntrait Foo {\n    // some functions\n}\n\nfn bar<T: Foo>(t: T) {} // ok!\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0404.rs","byte_start":497,"byte_end":500,"line_start":14,"line_end":14,"column_start":6,"column_end":9,"is_primary":true,"text":[{"text":"impl Foo for Bar {} //~ ERROR E0404","highlight_start":6,"highlight_end":9}],"label":"not a trait","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0404]: expected trait, found struct `Foo`\n  --> /checkout/src/test/ui/error-codes/E0404.rs:14:6\n   |\nLL | impl Foo for Bar {} //~ ERROR E0404\n   |      ^^^ not a trait\n\n"}
[00:47:57] {"message":"expected trait, found struct `Foo`","code":{"code":"E0404","explanation":"\nYou tried to use something which is not a trait in a trait position, such as\na bound or `impl`.\n\nErroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\nstruct Bar;\n\nimpl Foo for Bar {} // error: `Foo` is not a trait\n```\n\nAnother erroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\n\nfn bar<T: Foo>(t: T) {} // error: `Foo` is not a trait\n```\n\nPlease verify that you didn't misspell the trait's name or otherwise use the\nwrong identifier. Example:\n\n```\ntrait Foo {\n    // some functions\n}\nstruct Bar;\n\nimpl Foo for Bar { // ok!\n    // functions implementation\n}\n```\n\nor\n\n```\ntrait Foo {\n    // some functions\n}\n\nfn bar<T: Foo>(t: T) {} // ok!\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0404.rs","byte_start":553,"byte_end":556,"line_start":18,"line_end":18,"column_start":11,"column_end":14,"is_primary":true,"text":[{"text":"fn baz<T: Foo>(_: T) {} //~ ERROR E0404","highlight_start":11,"highlight_end":14}],"label":"not a tr
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0405.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0405/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0405/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"cannot find trait `SomeTrait` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0405.rs","byte_start":485,"byte_end":494,"line_start":13,"line_end":13,"column_start":6,"column_end":15,"is_primary":true,"text":[{"text":"impl SomeTrait for Foo {} //~ ERROR E0405","highlight_start":6,"highlight_end":15}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0405]: cannot find trait `SomeTrait` in this scope\n  --> /checkout/src/test/ui/error-codes/E0405.rs:13:6\n   |\nLL | impl SomeTrait for Foo {} //~ ERROR E0405\n   |      ^^^^^^^^^ not found in this scope\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:57] {"message":"For more information about this error, try `rustc --explain E0405`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0405`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/error-codes/E0405.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/error-codes/E0405.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/extern/extern-with-type-bounds.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/extern/extern-with-type-bounds.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-with-type-bounds/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-with-type-bounds/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"cannot find trait `NoSuchTrait` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solub.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/extern/extern-with-type-bounds.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/extern/extern-with-type-bounds.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/impl-trait/universal_wrong_bounds.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/impl-trait/universal_wrong_bounds.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/universal_wrong_bounds/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/universal_wrong_bounds/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"cannot find trait `Debug` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/universal_wrong_bounds.rs","byte_start":623,"byte_end":628,"line_start":19,"line_end":19,"column_start":24,"column_end":29,"is_primary":true,"text":[{"text":"fn wants_debug(g: impl Debug) { } //~ ERROR cannot find","highlight_start":24,"highlight_end":29}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidate is found in another module, you can import it into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/universal_wrong_bounds.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::fmt::Display;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::fmt::Debug;\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Debug` in this scope\n  --> /checkout/src/test/ui/impl-trait/universal_wrong_bounds.rs:19:24\n   |\nLL | fn wants_debug(g: impl Debug) { } //~ ERROR cannot find\n   |                        ^^^^^ not found in this scope\nhelp: possible candidate is found in another module, you can import it into scope\n   |\nLL | use std::fmt::Debug;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Debug` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/universal_wrong_bounds.rs","byte_start":681,"byte_end":686,"line_start":20,"line_end":20,"column_start":26,"column_end":31,"is_primary":true,"text":[{"text":"fn wants_display(g: impl Debug) { } //~ ERROR cannot find","highlight_start":26,"highlight_end":31}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidate is found in another module, you can import it into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/universal_wrong_bounds.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::fmt::Display;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::fmt::Debug;\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Debug` in this scope\n  --> /checkout/src/test/ui/impl-trait/universal_wrong_bounds.rs:20:26\n   |\nLL | fn wants_display(g: impl Debug) { } //~ ERROR cannot find\n   |                          ^^^^^ not found in this scope\nhelp: possible candidate is found in another module, you can import it into scope\n   |\nLL | use std::fmt::Debug;\n   |\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:47:57] {"message":"For more information about this error, try `rustc --explain E0405`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0405`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C pcted panic
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/issues/issue-2330.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/issues/issue-2330.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/macros/macro_path_as_generic_bound.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/macros/macro_path_as_generic_bound.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/macro_path_as_generic_bound/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/macro_path_as_generic_bound/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"failed to resolve. Use of undeclared type or module `m`","code":{"code":"E0433","explanation":"\nAn undeclared type or module was used.\n\nErroneous code example:\n\n```compile_fail,E0433\nlet map = HashMap::new();\n// error: failed to resolve. Use of undeclared type or module `HashMap`\n```\n\nPlease verify you didn't misspell the type/module's name or that you didn't\nforget to import it:\n\n\n```\nuse std::collections::HashMap; // HashMap has been imported.\nlet map: HashMap<u32, u32> = HashMap::new(); // So it can be used!\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/macros/macro_path_as_generic_bound.rs","byte_start":552,"byte_end":553,"line_start":17,"line_end":17,"column_start":6,"column_end":7,"is_primary":true,"text":[{"text":"foo!(m::m2::A); //~ ERROR failed to resolve","highlight_start":6,"highlight_end":7}],"label":"Use of undeclared type or module `m`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0433]: failed to resolve. Use of undeclared type or module `m`\n  --> /checkout/src/test/ui/macros/macro_path_as_generic_bound.rs:17:6\n   |\nLL | foo!(m::m2::A); //~ ERROR failed to resolve\n   |      ^ Use of undeclared type or module `m`\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:57] {"mary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"cannot find trait `Add` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":825,"byte_end":828,"line_start":20,"line_end":20,"column_start":6,"column_end":9,"is_primary":true,"text":[{"text":"impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope","highlight_start":6,"highlight_end":9}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidate is found in another module, you can import it into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":807,"byte_end":807,"line_start":19,"line_end":19,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"struct Test;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::ops::Add;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Add` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude.rs:20:6\n   |\nLL | impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope\n   |      ^^^ not found in this scope\nhelp: possible candidate is found in another module, you can import it into scope\n   |\nLL | use std::ops::Add;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Clone` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":894,"byte_end":899,"line_start":21,"line_end":21,"column_start":6,"column_end":11,"is_primary":true,"text":[{"text":"impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope","highlight_start":6,"highlight_end":11}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":807,"byte_end":807,"line_start":19,"line_end":19,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"struct Test;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::clone::Clone;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":807,"byte_end":807,"line_start":19,"line_end":19,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"struct Test;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::prelude::v1::Clone;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Clone` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude.rs:21:6\n   |\nLL | impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope\n   |      ^^^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL | use std::clone::Clone;\n   |\nLL | use std::prelude::v1::Clone;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Iterator` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":967,"byte_end":975,"line_start":22,"line_end":22,"column_start":6,"column_end":14,"is_primary":true,"text":[{"text":"impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope","highlight_start":6,"highlight_end":14}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":807,"byte_end":807,"line_start":19,"line_end":19,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"struct Test;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::iter::Iterator;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":807,"byte_end":807,"line_start":19,"line_end":19,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"struct Test;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::prelude::v1::Iterator;\n\n","suggestion_applicability":"Unspecified","expansion":nu that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude.rs","byte_start":1125,"byte_end":1131,"line_start":24,"line_end":24,"column_start":6,"column_end":12,"is_primary":true,"text":[{"text":"impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope","highlight_start":6,"highlight_end":12}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0405]: cannot find trait `Writer` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude.rs:24:6\n   |\nLL | impl Writer for Test {} //~ ERROR cannot find trait `Writer` in this scope\n   |      ^^^^^^ not found in this scope\n\n"}
[00:47:57] {"message":"cannot find function `drop` in this scope","code":{"code":"E0425","explanation":"\nAn unresolved name was used.\n\nErroneous code examples:\n\n```compile_fail,E0425\nsomething_that_doesnt_exist::foo;\n// error: unresolved name `something_that_doesnt_exist::foo`\n\n// or:\n\ntrait Foo {\n    fn bar() {\n        Self; // error: unresolved name `Self`\n    }\n}\n\n// or:\n\nlet x = unknown_variable;  // error: unresolved name `unknown_variable`\n```\n\nPlease verify that the name wasn't misspelled and ensure that the\nidentifier being referred to is valid for the given situation. Example:\n\n```\nenum something_that_does_exist {\n  t":1,"column_end":1,"is_primary":true,"text":[{"text":"struct Test;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::prelude::v1::drop;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0425]: cannot find function `drop` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude.rs:27:5\n   |\nLL |     drop(2) //~ ERROR cannot find function `drop` in this scope\n   |     ^^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL | use std::mem::drop;\n   |\nLL | use std::prelude::v1::drop;\n   |\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to 6 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 6 previous errors\n\n"}
[00:47:57] {"message":"Some errors occurred: E0405, E0425.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0405, E0425.\n"}
[00:47:57] {"message":"For more information about an error, try `rustc --explain E0405`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0405`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.saobby.my.eu.orghis scope\n   |              ^^^ not found in this scope\nhelp: possible candidate is found in another module, you can import it into scope\n   |\nLL |         use std::ops::Add;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Clone` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":940,"byte_end":945,"line_start":22,"line_end":22,"column_start":14,"column_end":19,"is_primary":true,"text":[{"text":"        impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope","highlight_start":14,"highlight_end":19}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":837,"byte_end":837,"line_start":20,"line_end":20,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::clone::Clone;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":837,"byte_end":837,"line_start":20,"line_end":20,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::prelude::v1::Clone;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Clone` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:22:14\n   |\nLL |         impl Clone for Test {} //~ ERROR cannot find trait `Clone` in this scope\n   |              ^^^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL |         use std::clone::Clone;\n   |\nLL |         use std::prelude::v1::Clone;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Iterator` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1021,"byte_end":1029,"line_start":23,"line_end":23,"column_start":14,"column_end":22,"is_primary":true,"text":[{"text":"        impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope","highlight_start":14,"highlight_end":22}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":837,"byte_end":837,"line_start":20,"line_end":20,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::iter::Iterator;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":837,"byte_end":837,"line_start":20,"line_end":20,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::prelude::v1::Iterator;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Iterator` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:23:14\n   |\nLL |         impl Iterator for Test {} //~ ERROR cannot  pub static foo : i32 = 0i32;\n}\n\nsomething_that_does_exist::foo; // ok!\n```\n\nOr:\n\n```\nlet unknown_variable = 12u32;\nlet x = unknown_variable; // ok!\n```\n\nIf the item is not defined in the current module, it must be imported using a\n`use` statement, like so:\n\n```\n# mod foo { pub fn bar() {} }\n# fn main() {\nuse foo::bar;\nbar();\n# }\n```\n\nIf the item you are importing is not defined in some super-module of the\ncurrent module, then it must also be declared as public (e.g., `pub fn`).\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1297,"byte_end":1301,"line_start":28,"line_end":28,"column_start":13,"column_end":17,"is_primary":true,"text":[{"text":"            drop(2) //~ ERROR cannot find function `drop` in this scope","highlight_start":13,"highlight_end":17}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":837,"byte_end":837,"line_start":20,"line_end":20,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::mem::drop;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":837,"byte_end":837,"line_start":20,"line_end":20,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::prelude::v1::drop;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0425]: cannot find function `drop` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:28:13\n   |\nLL |             drop(2) //~ ERROR cannot find function `drop` in this scope\n   |             ^^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL |         use std::mem::drop;\n   |\nLL |         use std::prelude::v1::drop;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Add` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1400,"byte_end":1403,"line_start":33,"line_end":33,"column_start":10,"column_end":13,"is_primary":true,"text":[{"text":"    impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope","highlight_start":10,"highlight_end":13}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidate is found in another module, you can import it into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":819,"byte_end":819,"line_start":19,"line_end":19,"column_start":5,"column_end":5,"is_primary":true,"text":[{"text":"    mod baz {","highlight_start":5,"highlight_end":5}],"label":null,"suggested_replacement":"use std::ops::Add;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Add` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:33:10\n   |\nLL |     impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope\n   |          ^^^ not found in this scope\nhelp: possible candidate is found in another module, you can import it into scope\n   |\nLL |     use std::ops::Add;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Clone` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrane` in this scope\n   |          ^^^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL |     use std::clone::Clone;\n   |\nLL |     use std::prelude::v1::Clone;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Iterator` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1550,"byte_end":1558,"line_start":35,"line_end":35,"column_start":10,"column_end":18,"is_primary":true,"text":[{"text":"    impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope","highlight_start":10,"highlight_end":18}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":819,"byte_end":819,"line_start":19,"line_end":19,"column_start":5,"column_end":5,"is_primary":true,"text":[{"text":"    mod baz {","highlight_start":5,"highlight_end":5}],"label":null,"suggested_replacement":"use std::iter::Iterator;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":819,"byte_end":819,"line_start":19,"line_end":19,"column_start":5,"column_end":5,"is_primary":true,"text":[{"text":"    mod baz {","highlight_start":5,"highlight_end":5}],"label":null,"suggested_replacement":"use std::prelude::v1::Iterator;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Iterator` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:35:10\n   |\nLL |     impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope\n   |          ^^^^^^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL |     use std::iter::Iterator;\n   |\nLL |     use std::prelude::v1::Iterator;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `ToString` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1633,"byte_end":1641,"line_start":36,"line_end":36,"column_start":10,"column_end":18,"is_primary":true,"text":[{"text":"    impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope","highlight_start":10,"highlight_end":18}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":819,"byte_end":819,"line_start":19,"line_end":19,"column_start":5,"column_end":5,"is_primary":true,"text":[{"text":"    mod baz {","highlight_start":5,"highlight_end":5}],"label":null,"suggested_replacement":"use std::prelude::v1::ToString;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":819,"byte_end":819,"line_start":19,"line_end":19,"column_start":5,"column_end":5,"is_primary":true,"text":[{"text":"    mod baz {","highlight_start":5,"highlight_end":5}],"label":null,"suggested_replacement":"use std::string::ToString;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `ToString` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:36:10\n   |\nLL |     impl ToStr       ^^^^^^ not found in this scope\n\n"}
[00:47:57] {"message":"cannot find function `drop` in this scope","code":{"code":"E0425","explanation":"\nAn unresolved name was used.\n\nErroneous code examples:\n\n```compile_fail,E0425\nsomething_that_doesnt_exist::foo;\n// error: unresolved name `something_that_doesnt_exist::foo`\n\n// or:\n\ntrait Foo {\n    fn bar() {\n        Self; // error: unresolved name `Self`\n    }\n}\n\n// or:\n\nlet x = unknown_variable;  // error: unresolved name `unknown_variable`\n```\n\nPlease verify that the name wasn't misspelled and ensure that the\nidentifier being referred to is valid for the given situation. Example:\n\n```\nenum something_that_does_exist {\n    Foo,\n}\n```\n\nOr:\n\n```\nmod something_that_does_exist {\n    pub static foo : i32 = 0i32;\n}\n\nsomething_that_does_exist::foo; // ok!\n```\n\nOr:\n\n```\nlet unknown_variable = 12u32;\nlet x = unknown_variable; // ok!\n```\n\nIf the item is not defined in the current module, it must be imported using a\n`use` statement, like so:\n\n```\n# mod foo { pub fn bar() {} }\n# fn main() {\nuse foo::bar;\nbar();\n# }\n```\n\nIf the item you are importing is not defined in some super-module of the\ncurrent module, then it must also be declared as public (e.g., `pub fn`).\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1810,"byte_end":1814,"line_start":40,"line_end":40,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":"        drop(2) //~ ERROR cannot find function `drop` in this scope","highlight_start":9,"highlight_end":13}],"label":"not found in this scope","o;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1971,"byte_end":1974,"line_start":48,"line_end":48,"column_start":14,"column_end":17,"is_primary":true,"text":[{"text":"        impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope","highlight_start":14,"highlight_end":17}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidate is found in another module, you can import it into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1945,"byte_end":1945,"line_start":47,"line_end":47,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::ops::Add;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Add` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:48:14\n   |\nLL |         impl Add for Test {} //~ ERROR cannot find trait `Add` in this scope\nmplements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":2129,"byte_end":2137,"line_start":50,"line_end":50,"column_start":14,"column_end":22,"is_primary":true,"text":[{"text":"        impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope","highlight_start":14,"highlight_end":22}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1945,"byte_end":1945,"line_start":47,"line_end":47,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::iter::Iterator;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1945,"byte_end":1945,"line_start":47,"line_end":47,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::prelude::v1::Iterator;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Iterator` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:50:14\n   |\nLL |         impl Iterator for Test {} //~ ERROR cannot find trait `Iterator` in this scope\n   |              ^^^^^^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL |         use std::iter::Iterator;\n   |\nLL |         use std::prelude::v1::Iterator;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `ToString` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":2216,"byte_end":2224,"line_start":51,"line_end":51,"column_start":14,"column_end":22,"is_primary":true,"text":[{"text":"        impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope","highlight_start":14,"highlight_end":22}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1945,"byte_end":1945,"line_start":47,"line_end":47,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::prelude::v1::ToString;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/no-implicit-prelude-nested.rs","byte_start":1945,"byte_end":1945,"line_start":47,"line_end":47,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":"        struct Test;","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":"use std::string::ToString;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `ToString` in this scope\n  --> /checkout/src/test/ui/no-implicit-prelude-nested.rs:51:14\n   |\nLL |         impl ToString for Test {} //~ ERROR cannot find trait `ToString` in this scope\n   |              ^^^^^^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL |         use std::prelude::v1::ToString;\n   |\nLL |         use std::string::ToString;\n   |\n\n"}
[00:47:57] {"message":"cannot find trait `Writer` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_filea bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/no-implicit-prelude-nested.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/no-implicit-prelude-nested.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/resolve/issue-21221-2.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/issue-21221-2.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/issue-21221-2/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/issue-21221-2/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"cannot find trait `T` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-21221-2.rs","byte_start":866,"byte_end":867,"line_start":28,"line_end":28,"column_start":6,"column_end":7,"is_primary":true,"text":[{"text":"impl T for Foo { }","highlight_start":6,"highlight_end":7}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidate is found in another module, you can import it into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-21221-2.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"pub mod foo {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use foo::bar::T;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `T` in this scope\n  --> /checkout/src/test/ui/resolve/issue-21221-2.rs:28:6\n   |\nLL | impl T for Foo { }\n   |      ^ not found in this scope\nhelp: possible candidate is found in another module, you can import it into scope\n   |\nLL | use foo::bar::T;\n   |\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:57] {"message":"For more information about this error, try `rustc --explain E0405`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0405`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/resolve/issue-21221-2.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/resolve/issue-21221-2.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/resolve/issue-21221-1.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/issue-21":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use mul1::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use mul2::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::ops::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Mul` in this scope\n  --> /checkout/src/test/ui/resolve/issue-21221-1.rs:53:6\n   |\nLL | impl Mul for Foo {\n   |      ^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL | use mul1::Mul;\n   |\nLL | use mul2::Mul;\n   |\nLL | use std::ops::Mul;\n   |\n\n"}
[00:47:57] {"message":"cannot find type `Mul` in this scope","code":{"code":"E0412","explanation":"\nThe type name used is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n    fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n    type N;\n\n    fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo<T>(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n    fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n    // either\n    use super::File;\n    // or\n    // use std::fs::File;\n    fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":1593,"byte_end":1596,"line_start":68,"line_end":68,"column_start":16,"column_end":19,"is_primary":true,"text":[{"text":"fn getMul() -> Mul {","highlight_start":16,"highlight_end":19}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidates are found in other modules, you can import them into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use mul1::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use mul2::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use mul3::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use mul4::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use mul5::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null},{"file_name":"/checkout/src/test/ui/resolve/issue-21221-1.rs","byte_start":467,"byte_end":467,"line_start":11,"line_end":11,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod mul1 {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::ops::Mul;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0412]: cannot find type `Mul` in this scope\n  --> /checkout/src/test/ui/resolve/issue-21221-1.rs:68:16\n   |\nLL | fn getMul() -> Mul {\n   |                ^^^ not found in this scope\nhelp: possible candidates are found in other modules, you can import them into scope\n   |\nLL | use mul1::Mul;\n   |\nLL | use mul2::Mul;\n   |\nLL | use mul3::Mul;\n   |\nLL | use mul4::Mul;\n   |\nand 2 other candidates\n\n"}
[00:47:57] {"message":"cannot find trait `ThisTraitReallyDoesntExistInAnyModuleReally` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solutionSome errors occurred: E0405, E0412.\n"}
[00:47:57] {"message":"For more information about an error, try `rustc --explain E0405`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0405`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/resolve/issue-21221-1.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/resolve/issue-21221-1.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/resolve/issue-21221-3.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/issue-21221-3.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/issue-21221-3/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-":"struct Foo;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use issue_21221_3::outer::OuterTrait;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `OuterTrait` in this scope\n  --> /checkout/src/test/ui/resolve/issue-21221-3.rs:25:6\n   |\nLL | impl OuterTrait for Foo {}\n   |      ^^^^^^^^^^ not found in this scope\nhelp: possible candidate is found in another module, you can import it into scope\n   |\nLL | use issue_21221_3::outer::OuterTrait;\n   |\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:57] {"message":"For more information about this error, try `rustc --explain E0405`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0405`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:57] {"message":"For more information about this error, try `rustc --explain E0405`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0405`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/resolve/issue-21221-4.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/resolve/issue-21221-4.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/resolve/issue-3907.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/issue-3907.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/issue-3907/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/issue-3907/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"expected trait, found type alias `Foo`","code":{"code":"E0404","explanation":"\nYou tried to use something which is not a trait in a trait position, such as\na bound or `impl`.\n\nErroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\nstruct Bar;\n\nimpl Foo for Bar {} // error: `Foo` is not a trait\n```\n\nAnother erroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\n\nfn bar<T: Foo>(t: T) {} // error: `Foo` is not a trait\n```\n\nPlease verify that you didn't misspell the trait's name or otherwise use the\nwrong identifier. Example:\n\n```\ntrait Foo {\n    // some functions\n}\nstruct Bar;\n\nimpl Foo for Bar { // ok!\n    // functions implementation\n}\n```\n\nor\n\n```\ntrait Foo {\n    // some functions\n}\n\nfn bar<T: Foo>(t: T) {} // ok!\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-3907.rs","byte_start":589,"byte_end":592,"line_start":20,"line_end":20,"column_start":6,"column_end":9,"is_primary":true,"text":[{"text":"impl Foo for S { //~ ERROR expected trait, found type alias `Foo`","highlight_start":6,"highlight_end":9}],"label":"type aliases cannot be used for traits","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible better candidate is found in another module, you can import it into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-3907.rs","byte_start":525,"byte_end":525,"line_start":14,"line_end":14,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"type Foo = issue_3907::Foo;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use issue_3907::Foo;\n\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0404]: expected trait, found type alias `Foo`\n  --> /checkout/src/test/ui/resolve/issue-3907.rs:20:6\n   |\nLL | impl Foo for S { //~ ERROR expected trait, found type alias `Foo`\n   |      ^^^ type aliases cannot be used for traits\nhelp: possible better candidate is found in another module, you can import it into scope\n   |\nLL | use issue_3907::Foo;\n   |\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:57] {"message":"For more information about this error, try `rustc --explain E0404`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0404`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreclias `K`\n   |      ^\n   |      |\n   |      did you mean `I`?\n   |      type aliases cannot be used for traits\n\n"}
[00:47:57] thread 'main' panicked at 'internal error: entered unreachable code', librustc_typeck/astconv.rs:696:18
[00:47:57] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:47:57] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:47:57] {"message":"Some errors occurred: E0404, E0432.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0404, E0432.\n"}
[00:47:57] {"message":"For more information about an error, try `rustc --explain E0404`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0404`.\n"}
[00:47:57] error: internal compiler error: unexpected panic
[00:47:57] 
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/resolve/issue-5035.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/resolve/issue-5035.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/resolve/resolve-self-in-impl-2.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/resolve-self-in-impl-2.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/resolve-self-in-impl-2/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/resolve-self-in-impl-2/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"expected trait, found self type `Self`","code":{"code":"E0411","explanation":"\nThe `Self` keyword was used outside an impl, trait, or type definition.\n\nErroneous code example:\n\n```compile_fail,E0411\n<Self>::foo; // error: use of `Self` outside of an impl, trait, or type\n             // definition\n```\n\nThe `Self` keyword represents the current type, which explains why it can only\nbe used inside an impl, trait, or type definition. It gives access to the\nassociated items of a type:\n\n```\ntrait Foo {\n    type Bar;\n}\n\ntrait Baz : Foo {\n    fn bar() -> Self::Bar; // like this\n}\n```\n\nHowever, be careful when two types have a common associated type:\n\n```compile_fail\ntrait Foo {\n    type Bar;\n}\n\ntrait Foo2 {\n    type Bar;\n}\n\ntrait Baz : Foo + Foo2 {\n    fn bar() -> Self::Bar;\n    // error: ambiguous associated type `Bar` in bounds of `Self`\n}\n```\n\nThis problem can be solved by specifying from which trait we want to use the\n`Bar` type:\n\n```\ntrait Foo {\n    type Bar;\n}\n\ntrait Foo2 {\n    type Bar;\n}\n\ntrait Baz : Foo + Foo2 {\n    fn bar() -> <Self as Foo>::Bar; // ok!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/resolve-self-in-impl-2.rs","byte_start":514,"byte_end":518,"line_start":14,"line_end":14,"column_start":6,"column_end":10,"is_primary":true,"text":[{"text":"impl Self for S {} //~ ERROR expected trait, found self type `Self`","highlight_start":6,"highlight_end":10}],"label":"`Self` is only available in traits and impls","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0411]: expected trait, found self type `Self`\n  --> /checkout/src/test/ui/resolve/resolve-self-in-impl-2.rs:14:6\n   |\nLL | impl Self for S {} //~ ERROR expected trait, found self type `Self`\n   |      ^^^^ `Self` is only available in traits and impls\n\n"}
[00:47:57] {"message":"cannot find trait `N` in `Self`","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTr unexpected panic
[00:47:57] note: the compiler unexpectedly panicked. this is a bug.
[00:47:57] 
[00:47:57] note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
[00:47:57] 
[00:47:57] 
[00:47:57] note: rustc 1.30.0-dev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/resolve/resolve-self-in-impl-2.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/resolve/resolve-self-in-impl-2.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/resolve/resolve-unknown-trait.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/resolve-unknown-trait.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/resolve-unknown-trait/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/resolve-unknown-trait/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"cannot find trait `SomeNonExistentTrait` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/resolve-unknown-trait.rs","byte_start":485,"byte_end":505,"line_start":12,"line_end":12,"column_start":18,"column_end":38,"is_primary":true,"text":[{"text":"trait NewTrait : SomeNonExistentTrait {}","highlight_start":18,"highlight_end":38}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0405]: cannot find trait `SomeNonExistentTrait` in this scope\n  --> /checkout/src/test/ui/resolve/resolve-unknown-trait.rs:12:18\n   |\nLL | trait NewTrait : SomeNonExistentTrait {}\n   |                  ^^^^^^^^^^^^^^^^^^^^ not found in this scope\n\n"}
[00:47:57] {"message":"cannot find trait `SomeNonExistentTrait` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/resolve-unknown-trait.rs","byte_start":581,"byte_end":601,"line_start":15,"line_end":15,"column_start":6,"column_end":26,"is_primary":true,"text":[{"text":"impl SomeNonExistentTrait for isize {}","highlight_start":6,"highlight_end":26}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0405]: cannot find trait `SomeNonExistentTrait` in this scope\n  --> /checkout/src/test/ui/resolve/resolve-unknown-trait.rs:15:6\n   |\nLL | impl SomeNonExistentTrait for isize {}\n   |      ^^^^^^^^^^^^^^^^^^^^ not found in this scope\n\n"}
[00:47:57] {"message":"cannot find trait `SomeNonExistentTrait` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/resolve-unknown-trait.rs","byte_start":689,"byte_end":709,"line_start":18,"line_end":18,"column_start":8,"column_end":28,"is_primary":true,"text":[{"text":"fn f<T:SomeNonExistentTrait>() {}","highlight_start":8,"highlight_end":28}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0405]: cannot find trait `SomeNonExistentTrait` in this scope\n  --> /checkout/src/test/ui/resolve/resolve-unknown-trait.rs:18:8\n   |\nLL | fn f<T:SomeNonExistentTrait>() {}\n   |        ^^^^^^^^^^^^^^^^^^^^ not found in this scope\n\n"}
[00:47:57] {"message":"`main` function not found in crate `resolve_unknown_trait`","code":{"code":"E0601","explanation":"\nNo `main` function was found in a binary crate. To fix this error, add a\n`main` function. For example:\n\n```\nfn main() {\n    // Your program will start here.\n    println!(\"Hello world!\");\n}\n```\n\nIf you don't know the basics of Rust, you can go look to the Rust Book to get\nstarted: https://doc.rust-lang.org/book/\n"},"level":"error","spans":[],"children":[{"message":"consider adding a `main` function to `/checkout/src/test/ui/resolve/resolve-unknown-trait.rs`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0601]: `main` function not found in crate `resolve_unknown_trait`\n   |\n   = note: consider adding a `main` function to `/checkout/src/test/ui/resolve/resolve-unknown-trait.rs`\n\n"}
[00:47:57] threadline_end":11,"column_start":8,"column_end":16,"is_primary":true,"text":[{"text":"fn f<F:Nonexist(isize) -> isize>(x: F) {}","highlight_start":8,"highlight_end":16}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0405]: cannot find trait `Nonexist` in this scope\n  --> /checkout/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.rs:11:8\n   |\nLL | fn f<F:Nonexist(isize) -> isize>(x: F) {}\n   |        ^^^^^^^^ not found in this scope\n\n"}
[00:47:57] {"message":"expected trait, found type alias `Typedef`","code":{"code":"E0404","explanation":"\nYou tried to use something which is not a trait in a trait position, such as\na bound or `impl`.\n\nErroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\nstruct Bar;\n\nimpl Foo for Bar {} // error: `Foo` is not a trait\n```\n\nAnother erroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\n\nfn bar<T: Foo>(t: T) {} // error: `Foo` is not a trait\n```\n\nPlease verify that you didn't misspell the trait's name or otherwise use the\nwrong identifier. Example:\n\n```\ntrait Foo {\n    // some functions\n}\nstruct Bar;\n\nimpl Foo for Bar { // ok!\n    // functions implementation\n}\n```\n\nor\n\n```\ntrait Foo {\n    // some functions\n}\n\nfn bar<T: Foo>(t: T) {} // ok!\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/unboxed-closure-sugar-nonexistent-trait.rs","byte_start":580,"byte_end":603,"line_start":16,"line_end":16,"column_start":8,"column_end":31,"is_primary":true,"text":[{"text":"fn g<F:Typedef(isize) -> isize>(x: F) {}","hi-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/resolve/unboxed-closure-sugar-nonexistent-trait.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/resolve/unboxed-closure-sugar-nonexistent-trait.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/rfc1598-generic-associated-types/generic-associated-types-where.rs stdout ----
[00:47:57] diff of stderr:
[00:47:57] 
[00:47:57] 4 LL | #![feature(generic_associated_types)]
[00:47:57] 6 
[00:47:57] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:47:57] +   --> $DIR/generic-associated-types-where.rs:32:44
[00:47:57] +    |
[00:47:57] +    |
[00:47:57] + LL |     type WithDefault<'a, T> = &'a Iterator<T>;
[00:47:57] +    |                                            ^ unexpected type argument
[00:47:57] + 
[00:47:57] + error[E0191]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified
[00:47:57] +   --> $DIR/generic-associated-types-where.rs:32:35
[00:47:57] +    |
[00:47:57] + LL |     type WithDefault<'a, T> = &'a Iterator<T>;
[00:47:57] +    |                                   ^^^^^^^^^^^ missing associated type `Item` value
[00:47:57] + error: aborting due to 2 previous errors
[00:47:57] + 
[00:47:57] + Some errors occurred: E0107, E0191.
[00:47:57] + For more information about an error, try `rustc --explain E0107`.
[00:47:57] + For more information about an error, try `rustc --explain E0107`.
[00:47:57] 7 
[00:47:57] 
[00:47:57] 
[00:47:57] The actual stderr differed from the expected stderr.
[00:47:57] Actual stderr saved to /checkout/obj/build/x_name":"/checkout/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs","byte_start":991,"byte_end":992,"line_start":32,"line_end":32,"column_start":44,"column_end":45,"is_primary":true,"text":[{"text":"    type WithDefault<'a, T> = &'a Iterator<T>;","highlight_start":44,"highlight_end":45}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 0, found 1\n  --> /checkout/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs:32:44\n   |\nLL |     type WithDefault<'a, T> = &'a Iterator<T>;\n   |                                            ^ unexpected type argument\n\n"}
[00:47:57] {"message":"the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified","code":{"code":"E0191","explanation":"\nTrait objects need to have all associated types specified. Erroneous code\nexample:\n\n```compile_fail,E0191\ntrait Trait {\n    type Bar;\n}\n\ntype Foo = Trait; // error: the value of the associated type `Bar` (from\n                  //        the trait `Trait`) must be specified\n```\n\nPlease verify you specified all associated types of the trait and that you\nused the right trait. Example:\n\n```\ntrait Trait {\n    type Bar;\n}\n\ntype Foo = Trait<Bar=i32>; // ok!\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs","byte_start":982,"byte_end":993,"line_start":32,"line_end":32,"column_start":35,"column_end":46,"is_primary":true,"text":[{"text":"    type WithDefault<'a, T> = &'a Iterator<T>;","highlight_start":35,"highlight_end":46}],"label":"missing associated type `Item` value","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0191]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified\n  --> /checkout/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs:32:35\n   |\nLL |     type WithDefault<'a, T> = &'a Iterator<T>;\n   |                                   ^^^^^^^^^^^ missing associated type `Item` value\n\n"}
[00:47:57] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:47:57] {"message":"Some errors occurred: E0107, E0191.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0107, E0191.\n"}
[00:47:57] {"message":"For more information about an error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0107`.\n"}
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/rfc1598-generic-associated-types/generic-associated-types-where.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] 
[00:47:57] ---- [ui] ui/rfc1598-generic-associated-types/issue-47206.rs stdout ----
[00:47:57] normalized stderr:
[00:47:57] warning: the feature `generic_associated_types` is incomplete and may cause the compiler to crash
[00:47:57]    |
[00:47:57]    |
[00:47:57] LL | #![feature(generic_associated_types)]
[00:47:57] 
[00:47:57] 
[00:47:57] 
[00:47:57] 
[00:47:57] 
[00:47:57] The actual stderr differed from the expected stderr.
[00:47:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc1598-generic-associated-types/issue-47206/issue-47206.stderr
[00:47:57] To update references, rerun the tests and pass the `--bless` flag
[00:47:57] To only update this specific test, also pass `--test-args rfc1598-generic-associated-types/issue-47206.rs`
[00:47:57] error: 1 errors occurred comparing output.
[00:47:57] status: exit code: 0
[00:47:57] status: exit code: 0
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/rfc1598-generic-associated-types/issue-47206.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc1598-generic-associated-types/issue-47206/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfc1598-generic-associated-types/issue-47206/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"the feature `generic_associated_types` is incomplev running on x86_64-unknown-linux-gnu
[00:47:57] 
[00:47:57] note: compiler flags: -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] thread '[ui] ui/span/issue-35987.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] thread '[ui] ui/span/issue-35987.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:47:57] 
[00:47:57] ---- [ui] ui/traits/trait-bounds-not-on-struct.rs stdout ----
[00:47:57] 
[00:47:57] error: Error: expected failure status (Some(1)) but received status Some(101).
[00:47:57] status: exit code: 101
[00:47:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/traits/trait-bounds-not-on-struct.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-bounds-not-on-struct/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-bounds-not-on-struct/auxiliary" "-A" "unused"
[00:47:57] ------------------------------------------
[00:47:57] 
[00:47:57] ------------------------------------------
[00:47:57] stderr:
[00:47:57] stderr:
[00:47:57] ------------------------------------------
[00:47:57] {"message":"expected trait, found struct `Foo`","code":{"code":"E0404","explanation":"\nYou tried to use something which is not a trait in a trait position, such as\na bound or `impl`.\n\nErroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\nstruct Bar;\n\nimpl Foo for Bar {} // error: `Foo` is not a trait\n```\n\nAnother erroneous code example:\n\n```compile_fail,E0404\nstruct Foo;\n\nfn bar<T: Foo>(t: T) {} // error: `Foo` is not a trait\n```\n\nPlease verify that you didn't misspell the trait's name or otherwise use the\nwrong identifier. Example:\n\n```\ntrait Foo {\n    // some functions\n}\nstruct Bar;\n\nimpl Foo for Bar { // ok!\n    // functions implementation\n}\n```\n\nor\n\n```\ntrait Foo {\n    // some functions\n}\n\nfn bar<T: Foo>(t: T) {} // ok!\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-bounds-not-on-struct.rs","byte_start":526,"byte_end":529,"line_start":15,"line_end":15,"column_start":16,"column_end":19,"is_primary":true,"text":[{"text":"fn foo(_x: Box<Foo + Send>) { } //~ ERROR expected trait, found struct `Foo`","highlight_start":16,"highlight_end":19}],"label":"not a trait","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0404]: expected trait, found struct `Foo`\n  --> /checkout/src/test/ui/traits/trait-bounds-not-on-struct.rs:15:16\n   |\nLL | fn foo(_x: Box<Foo + Send>) { } //~ ERROR expected trait, found struct `Foo`\n   |                ^^^ not a trait\n\n"}
---
[00:47:57]     [ui] ui/impl-trait/universal_wrong_bounds.rs
[00:47:57]     [ui] ui/issues/issue-2330.rs
[00:47:57]     [ui] ui/macros/macro_path_as_generic_bound.rs
[00:47:57]     [ui] ui/no-implicit-prelude-nested.rs
[00:47:57]  " "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -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" "5.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"
[00:47:57] 
[00:47:57] 
[00:47:57] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:47:57] Build completed unsuccessfully in 0:03:06
[00:47:57] Build completed unsuccessfully in 0:03:06
[00:47:57] make: *** [check] Error 1
[00:47:57] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0200204a
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0158f77b:start=1535413568967040803,finish=1535413568975452643,duration=8411840
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:10a0ffbd
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1e8c9df5
travis_time:start:1e8c9df5
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386

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

This change causes unexpected panics in a bunch of tests :-/

I figured that it wouldn't affect any tests, let alone this many.


[00:47:57]     [ui] ui/codemap_tests/two_files.rs
[00:47:57]     [ui] ui/error-codes/E0404.rs
[00:47:57]     [ui] ui/error-codes/E0405.rs
[00:47:57]     [ui] ui/extern/extern-with-type-bounds.rs
[00:47:57]     [ui] ui/impl-trait/universal_wrong_bounds.rs
[00:47:57]     [ui] ui/issues/issue-2330.rs
[00:47:57]     [ui] ui/macros/macro_path_as_generic_bound.rs
[00:47:57]     [ui] ui/no-implicit-prelude-nested.rs
[00:47:57]     [ui] ui/no-implicit-prelude.rs
[00:47:57]     [ui] ui/resolve/issue-21221-1.rs
[00:47:57]     [ui] ui/resolve/issue-21221-2.rs
[00:47:57]     [ui] ui/resolve/issue-21221-3.rs
[00:47:57]     [ui] ui/resolve/issue-21221-4.rs
[00:47:57]     [ui] ui/resolve/issue-3907.rs
[00:47:57]     [ui] ui/resolve/issue-5035.rs
[00:47:57]     [ui] ui/resolve/resolve-self-in-impl-2.rs
[00:47:57]     [ui] ui/resolve/resolve-unknown-trait.rs
[00:47:57]     [ui] ui/resolve/unboxed-closure-sugar-nonexistent-trait.rs
[00:47:57]     [ui] ui/rfc1598-generic-associated-types/generic-associated-types-where.rs
[00:47:57]     [ui] ui/rfc1598-generic-associated-types/issue-47206.rs
[00:47:57]     [ui] ui/span/issue-35987.rs
[00:47:57]     [ui] ui/traits/trait-bounds-not-on-struct.rs
[00:47:57]     [ui] ui/traits/trait-test.rs

@kennytm
Copy link
Member

kennytm commented Aug 28, 2018

@bors r-

ICEs in many UI tests.

@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 Aug 28, 2018
@nikomatsakis
Copy link
Contributor Author

Fascinating. I also did not expect that. =)

@TimNN
Copy link
Contributor

TimNN commented Sep 4, 2018

Ping from triage, @nikomatsakis: What are your plans for this PR?

@bors
Copy link
Contributor

bors commented Sep 8, 2018

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

@nikomatsakis
Copy link
Contributor Author

Haven't had a chance to get back to it. Will soon.

@TimNN
Copy link
Contributor

TimNN commented Sep 25, 2018

Ping from triage, @nikomatsakis!

@TimNN
Copy link
Contributor

TimNN commented Oct 9, 2018

Ping from triage @nikomatsakis! I'm closing this PR as inactive for the moment, per https://forge.rust-lang.org/triage-procedure.html. Please feel free to re-open in the future, when you work on this again.

@TimNN TimNN closed this Oct 9, 2018
@TimNN TimNN 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 Oct 9, 2018
@Centril Centril added the F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs label Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

where clause in generic associated types causes no output
10 participants