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

Various minor/cosmetic improvements to code #56578

Merged
merged 7 commits into from
Dec 8, 2018
Merged

Conversation

alexreg
Copy link
Contributor

@alexreg alexreg commented Dec 7, 2018

r? @Centril 😄

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 7, 2018
@rust-highfive rust-highfive assigned Centril and unassigned petrochenkov Dec 7, 2018
@alexreg
Copy link
Contributor Author

alexreg commented Dec 7, 2018

Note: the import reordering/grouping is probably unnecessary in hindsight, since I hear people are working on running rustfmt on the source as a matter of process... that said, they don't hurt, and there are plenty of other good changes in there.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

src/libsyntax/feature_gate.rs Outdated Show resolved Hide resolved
@Centril
Copy link
Contributor

Centril commented Dec 7, 2018

cc me with nit fixed and when CI passes.

@rust-highfive

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Dec 7, 2018

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

@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.
travis_time:end:1b4595a0:start=1544150510421805175,finish=1544150513191922006,duration=2770116831
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
travis_time:start:test_ui
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:46:17] 
[00:46:17] running 5127 tests
[00:46:20] ...............................................................F.................................... 100/5127
[00:46:23] .................................................................................................F.. 200/5127
[00:46:28] .................................................................................................... 400/5127
[00:46:32] .................................................................................................... 500/5127
[00:46:35] ..............................i..................................................................... 600/5127
[00:46:38] .................................................................................................... 700/5127
[00:46:38] .................................................................................................... 700/5127
[00:46:44] .................................................................................................... 800/5127
[00:46:48] .i...............i..........................................................................F....... 900/5127
[00:46:51] ........................iiiii..............F........................................................ 1000/5127
[00:46:54] ..................F................................................................................. 1100/5127
[00:46:57] .................................................................................................... 1200/5127
[00:46:59] ......................................................F............................................. 1300/5127
[00:47:04] .................................................................................................... 1500/5127
[00:47:07] ............................i....................................................................i.. 1600/5127
[00:47:10] .................................................................................................... 1700/5127
[00:47:13] ................................................................................................F... 1800/5127
[00:47:13] ................................................................................................F... 1800/5127
[00:47:17] .................................................................................................... 1900/5127
[00:47:20] ......................................i............................................................. 2000/5127
[00:47:23] .................................................................................................... 2100/5127
[00:47:28] ..........................................................F.F...........FF.......................... 2200/5127
[00:47:31] ........................................................................................F.........F. 2300/5127
[00:47:35] ....F.....................................F......................................................... 2400/5127
[00:47:39] .................................................................................................... 2500/5127
[00:47:42] ..F..............F..F..................................................F............................ 2600/5127
[00:47:50] .................................................................................................... 2800/5127
[00:47:50] .................................................................................................... 2800/5127
[00:47:53] .................................F..................................................F............... 2900/5127
[00:48:00] ..................................................................................i................. 3100/5127
[00:48:03] .................................................................................................... 3200/5127
[00:48:06] .............................................ii..i..ii.............................................. 3300/5127
[00:48:10] .................................................................................................... 3400/5127
---
[00:48:21] ..i................................................................................................. 3900/5127
[00:48:26] .................................................................................................... 4000/5127
[00:48:31] .................................................................................................... 4100/5127
[00:48:34] .................................................................................................... 4200/5127
[00:48:38] .................................................................................................Fi. 4300/5127
[00:48:43] .................................................................................................... 4400/5127
[00:48:47] ......F............................................................................................. 4500/5127
[00:48:54] ...................................................................................i................ 4700/5127
[00:48:54] ...................................................................................i................ 4700/5127
[00:48:57] ...............................F.................................................................... 4800/5127
[00:49:01] ..................................................F................................................. 4900/5127
[00:49:03] ..............................................................................................F..... 5000/5127
[00:49:07] ...........................
[00:49:07] failures:
[00:49:07] 
[00:49:07] ---- [ui] ui/associated-const/associated-const-no-item.rs stdout ----
[00:49:07] ---- [ui] ui/associated-const/associated-const-no-item.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no associated item named `ID` found for type `i32` in the current scope
[00:49:07] -   --> $DIR/associated-const-no-item.rs:16:23
[00:49:07] +   --> $DIR/associated-const-no-item.rs:16:16
[00:49:07] 3    |
[00:49:07] 4 LL | const X: i32 = <i32>::ID;
[00:49:07] -    |                |
[00:49:07] -    |                associated item not found in `i32`
[00:49:07] +    |                ^^^^^^^^^ associated item not found in `i32`
[00:49:07] 8    |
[00:49:07] 8    |
[00:49:07] 9    = help: items from traits can only be used if the trait is implemented and in scope
[00:49:07] 10    = note: the following trait defines an item `ID`, perhaps you need to implement it:
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-const/associated-const-no-item/associated-const-no-item.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args associated-const/associated-const-no-item.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/associated-const/associated-const-no-item.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/associated-const/associated-const-no-item/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/associated-const/associated-const-no-item/auxiliary" "-A" "unused"
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"no associated item named `ID` found for type `i32` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-const/associated-const-no-item.rs","byte_start":517,"byte_end":526,"line_start":16,"line_end":16,"column_start":16,"column_end":25,"is_primary":true,"text":[{"text":"const X: i32 = <i32>::ID;","highlight_start":BACKTRACE=1` for a backtrace.
[00:49:07] ---- [ui] ui/bogus-tag.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 
[00:49:07] 1 error[E0599]: no variant named `hsl` found for type `color` in the current scope
[00:49:07] -   --> $DIR/bogus-tag.rs:18:14
[00:49:07] +   --> $DIR/bogus-tag.rs:18:7
[00:49:07] 3    |
[00:49:07] 4 LL | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), }
[00:49:07] 5    | ---------- variant `hsl` not found here
[00:49:07] 6 ...
[00:49:07] 6 ...
[00:49:07] 7 LL |       color::hsl(h, s, l) => { println!("hsl"); }
[00:49:07] -    |       -------^^^--------- variant not found in `color`
[00:49:07] +    |       ^^^^^^^^^^^^^^^^^^^ variant not found in `color`
[00:49:07] 10 error: aborting due to previous error
[00:49:07] 11 
[00:49:07] 
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/bogus-tag/bogus-tag.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args bogus-tag.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/bogus-tag.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/bogus-tag/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-99]: no variant named `hsl` found for type `color` in the current scope\n  --> /checkout/src/test/ui/bogus-tag.rs:18:7\n   |\nLL | enum color { rgb(isize, isize, isize), rgba(isize, isize, isize, isize), }\n   | ---------- variant `hsl` not found here\n...\nLL |       color::hsl(h, s, l) => { println!(\"hsl\"); }\n   |       ^^^^^^^^^^^^^^^^^^^ variant not found in `color`\n\n"}
[00:49:07] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/bogus-tag.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/did_you_mean/bad-assoc-pat.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 23    |          ^^^^^^^^^^^^^^^^ help: try: `<(u8,)>::AssocItem`
[00:49:07] 24 
[00:49:07] 25 error[E0599]: no associated item named `AssocItem` found for type `[u8]` in the current scope
[00:49:07] +   --> $DIR/bad-assoc-pat.rs:13:9
[00:49:07] 27    |
[00:49:07] 27    |
[00:49:07] 28 LL |         [u8]::AssocItem => {}
[00:49:07] -    |         |
[00:49:07] -    |         associated item not found in `[u8]`
[00:49:07] +    |         ^^^^^^^^^^^^^^^ associated item not found in `[u8]`
[00:49:07] 32 
[00:49:07] 32 
[00:49:07] 33 error[E0599]: no associated item named `AssocItem` found for type `(u8, u8)` in the current scope
[00:49:07] +   --> $DIR/bad-assoc-pat.rs:16:9
[00:49:07] 35    |
[00:49:07] 35    |
[00:49:07] 36 LL |         (u8, u8)::AssocItem => {}
[00:49:07] -    |         |
[00:49:07] -    |         |
[00:49:07] -    |         associated item not found in `(u8, u8)`
[00:49:07] +    |         ^^^^^^^^^^^^^^^^^^^ associated item not found in `(u8, u8)`
[00:49:07] 40 
[00:49:07] 41 error[E0599]: no associated item named `AssocItem` found for type `_` in the current scope
[00:49:07] +   --> $DIR/bad-assoc-pat.rs:19:9
[00:49:07] 43    |
[00:49:07] 43    |
[00:49:07] 44 LL |         _::AssocItem => {}
[00:49:07] -    |         ---^^^^^^^^^
[00:49:07] -    |         associated item not found in `_`
[00:49:07] +    |         ^^^^^^^^^^^^ associated item not found in `_`
[00:49:07] 48 
[00:49:07] 48 
[00:49:07] 49 error[E0599]: no associated item named `AssocItem` found for type `(u8,)` in the current scope
[00:49:07] +   --> $DIR/bad-assoc-pat.rs:24:10
[00:49:07] 51    |
[00:49:07] 51    |
[00:49:07] 52 LL |         &(u8,)::AssocItem => {}
[00:49:07] -    |          |
[00:49:07] -    |          |
[00:49:07] -    |          associated item not found in `(u8,)`
[00:49:07] +    |          ^^^^^^^^^^^^^^^^ associated item not found in `(u8,)`
[00:49:07] 57 error: aborting due to 8 previous errors
[00:49:07] 58 
[00:49:07] 
[00:49:07] 
[0ans":[{"file_name":"/checkout/src/test/ui/did_you_mean/bad-assoc-pat.rs","byte_start":1112,"byte_end":1128,"line_start":24,"line_end":24,"column_start":10,"column_end":26,"is_primary":true,"text":[{"text":"        &(u8,)::AssocItem => {}","highlight_start":10,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/did_you_mean/bad-assoc-pat.rs","byte_start":1112,"byte_end":1128,"line_start":24,"line_end":24,"column_start":10,"column_end":26,"is_primary":true,"text":[{"text":"        &(u8,)::AssocItem => {}","highlight_start":10,"highlight_end":26}],"label":null,"suggested_replacement":"<(u8,)>::AssocItem","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error: missing angle brackets in associated item path\n  --> /checkout/src/test/ui/did_you_mean/bad-assoc-pat.rs:24:10\n   |\nLL |         &(u8,)::AssocItem => {}\n   |          ^^^^^^^^^^^^^^^^ help: try: `<(u8,)>::AssocItem`\n\n"}
[00:49:07] {"message":"no associated item named `AssocItem` found for type `[u8]` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/did_you_mean/bad-assoc-pat.rs","byte_start":503,"byte_end":518,"line_start":13,"line_end":13,"column_start":9,"column_end":24,"is_primary":true,"text":[{"text":"        [u8]::AssocItem => {}","highlight_start":9,"highlight_end":24}],"label":"associated item not found in `[u8]`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no associated item named `AssocItem` found for type `[u8]` in the current scope\n  --> /checkout/src/test/ui/did_you_mean/bad-assoc-pat.rs:13:9\n   |\nLL |         [u8]::AssocItem => {}\n   |         ^^^^^^^^^^^^^^^ associated item not found in `[u8]`\n\n"}
[00:49:07] {"message":"no associated item named `AssocItem` found for type `(u8, u8)` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/did_you_mean/bad-assoc-pat.rs","byte_start":698,"byte_end":717,"line_start":16,"line_end":16,"column_start":9,"column_end":28,"is_primary":true,"text":[{"text":"        (u8, u8)::AssocItem => {}","highlight_start":9,"highlight_end":28}],"label":"associated item not found in `(u8, u8)`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no associated item named `AssocItem` found for type `(u8, u8)` in the current scope\n  --> /checkout/src/test/ui/did_you_mfound for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/did_you_mean/bad-assoc-pat.rs","byte_start":1112,"byte_end":1128,"line_start":24,"line_end":24,"column_start":10,"column_end":26,"is_primary":true,"text":[{"text":"        &(u8,)::AssocItem => {}","highlight_start":10,"highlight_end":26}],"label":"associated item not found in `(u8,)`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no associated item named `AssocItem` found for type `(u8,)` in the current scope\n  --> /checkout/src/test/ui/did_you_mean/bad-assoc-pat.rs:24:10\n   |\nLL |         &(u8,)::AssocItem => {}\n   |          ^^^^^^^^^^^^^^^^ associated item not found in `(u8,)`\n\n"}
[00:49:07] {"message":"aborting due to 8 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 8 previous errors\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/did_you_mean/bad-assoc-pat.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/dont-suggest-private-trait-method.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no function or associated item named `new` found for type `T` in the currentwn-linux-gnu/test/ui/dont-suggest-private-trait-method/auxiliary" "-A" "unused"
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"no function or associated item named `new` found for type `T` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/dont-suggest-private-trait-method.rs","byte_start":467,"byte_end":476,"line_start":11,"line_end":11,"column_start":1,"column_end":10,"is_primary":false,"text":[{"text":"struct T;","highlight_start":1,"highlight_end":10}],"label":"function or associated item `new` not found for this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/dont-suggest-private-trait-method.rs","byte_start":494,"byte_end":500,"line_start":14,"line_end":14,"column_start":5,"column_end":11,"is_primary":true,"text":[{"text":"    T::new();","highlight_start":5,"highlight_end":11}],"label":"function or associated item not found in `T`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no function or associated item named `new` found for type `T` in the current scope\n  --> /checkout/src/test/ui/dont-suggest-private-trait-method.rs:14:5\n   |\nLL | struct T;\n   | --------- function or associated item `new` not found for this\n...\nLL |     T::new();\n   |     ^^^^^^ function or associated item not found in `T`\n\n"}
[00:49:07] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/dont-suggest-private-trait-method.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/empty/empty-struct-braces-expr.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 47    |               did you mean `XEmpty1 { /* fields */ }`?
[00:49:07] 48 
[00:49:07] 49 error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope
[00:49:07] +   --> $DIR/empty-struct-braces-expr.rs:32:15
[00:49:07] 51    |
[00:49:07] 51    |
[00:49:07] 52 LL |     let xe3 = XE::Empty3; //~ ERROR no variant named `Empty3` found for type
[00:49:07] -    |               |
[00:49:07] -    |               |
[00:49:07] -    |               variant not found in `empty_struct::XE`
[00:49:07] +    |               ^^^^^^^^^^e or a value was expected and the\nidentifier exists but it belongs to a different namespace.\n\nFor (an erroneous) example, here a `struct` variant name were used as a\nfunction:\n\n```compile_fail,E0423\nstruct Foo { a: bool };\n\nlet f = Foo();\n// error: expected function, found `Foo`\n// `Foo` is a struct name, but this expression uses it like a function name\n```\n\nPlease verify you didn't misspell the name of what you actually wanted to use\nhere. Example:\n\n```\nfn Foo() -> u32 { 0 }\n\nlet f = Foo(); // ok!\n```\n\nIt is common to forget the trailing `!` on macro invocations, which would also\nyield this error:\n\n```compile_fail,E0423\nprintln(\"\");\n// error: expected function, found macro `println`\n// did you mean `println!(...)`? (notice the trailing `!`)\n```\n\nAnother case where this error is emitted is when a value is expected, but\nsomething else is found:\n\n```compile_fail,E0423\npub mod a {\n    pub const I: i32 = 1;\n}\n\nfn h1() -> i32 {\n    a.I\n    //~^ ERROR expected value, found module `a`\n    // did you mean `a::I`?\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/empty/empty-struct-braces-expr.rs","byte_start":754,"byte_end":760,"line_start":26,"line_end":26,"column_start":14,"column_end":20,"is_primary":true,"text":[{"text":"    let e1 = Empty1(); //~ ERROR expected function, found struct `Empty1`","highlight_start":14,"highlight_end":20}],"label":"did you mean `XEmpty2`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/empty/empty-struct-braces-expr.rs","byte_start":754,"byte_end":760,"line_start":26,"line_end":26,"column_start":14,"column_end":20,"is_primary":true,"text":[{"text":"    let e1 = Empty1(); //~ ERROR expected function, found struct `Empty1`","highlight_start":14,"highlight_end":20}],"label":"did you mean `Empty1 { /* fields */ }`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0423]: expected function, found struct `Empty1`\n  --> /checkout/src/test/ui/empty/empty-struct-braces-expr.rs:26:14\n   |\nLL |     let e1 = Empty1(); //~ ERROR expected function, found struct `Empty1`\n   |              ^^^^^^\n   |              |\n   |              did you mean `XEmpty2`?\n   |              did you mean `Empty1 { /* fields */ }`?\n\n"}
[00:49:07] {"message":"expected value, found struct variant `E::Empty3`","code":{"code":"E0423","explanation":"\nAn identifier was used like a function name or a value was expected and the\nidentifier exists but it belongs to a different namespace.\n\nFor (an erroneous) example, here a `struct` variant name were used as a\nfunction:\n\n```compile_fail,E0423\nstruct Foo { a: bool };\n\nlet f = Foo();\n// error: expected function, found `Foo`\n// `Foo` is a struct name, but this expression uses it like a function name\n```\n\nPlease verify you didn't misspell the name of what you actually wanted to use\nhere. Example:\n\n```\nfn Foo() -> u32 { 0 }\n\nlet f = Foo(); // ok!\n```\n\nIt is common to forget the trailing `!` on macro invocations, which would also\nyield this error:\n\n```compile_fail,E0423\nprintln(\"\");\n// error: expected function, found macro `println`\n// did you mean `println!(...)`? (notice the trailing `!`)\n```\n\nAnother case where this error is emitted is when a value is expected, but\nsomething else is found:\n\n```compile_fail,E0423\npub mod a {\n    pub const I: i32 = 1;\n}\n\nfn h1() -> i32 {\n    a.I\n    //~^ ERROR expected value, found module `a`\n    // did you mean `a::I`?\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/empty/empty-struct-braces-expr.rs","byte_start":828,"byte_end":837,"line_start":27,"line_end":27,"column_start":14,"column_end":23,"is_primary":true,"text":[{"text":"    let e3 = E::Empty3; //~ ERROR expected value, found struct variant `E::Empty3`","highlight_start":14,"highlight_end":23}],"label":"did you mean `E::Empty3 { /* fields */ }`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0423]: expected value, found struct variant `E::Empty3`\n  --> /checkout/src/test/ui/empty/empty-struct-braces-expr.rs:27:14\n   |\nLL |     let e3 = E::Empty3; //~ ERROR expected value, found struct variant `E::Empty3`\n   |              ^^^^^^^^^ did you mean `E::Empty3 { /* fields */ }`?\n\n"}
[00:49:07] {"message":"expected function, found struct variant `E::Empty3`","code":{"code":"E0423","explanation":"\nAn identifier was used like a function name or a value was expected and the\nidentifier exists but it belongs to a different namespace.\n\nFor (an erroneous) example, here a `struct` variant name were used as a\nfunction:\n\n```compile_fail,E0423\nstruct Foo { a: bool };\n\nlet f = Foo();\n// error: expected function, found `Foo`\n// `Foo` is a struct name, but this expression uses it like a function name\n```\n\yte_end":1008,"line_start":30,"line_end":30,"column_start":15,"column_end":22,"is_primary":true,"text":[{"text":"    let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1`","highlight_start":15,"highlight_end":22}],"label":"did you mean `XEmpty1 { /* fields */ }`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0423]: expected value, found struct `XEmpty1`\n  --> /checkout/src/test/ui/empty/empty-struct-braces-expr.rs:30:15\n   |\nLL |     let xe1 = XEmpty1; //~ ERROR expected value, found struct `XEmpty1`\n   |               ^^^^^^^\n   |               |\n   |               did you mean `XEmpty2`?\n   |               did you mean `XEmpty1 { /* fields */ }`?\n\n"}
[00:49:07] {"message":"expected function, found struct `XEmpty1`","code":{"code":"E0423","explanation":"\nAn identifier was used like a function name or a value was expected and the\nidentifier exists but it belongs to a different namespace.\n\nFor (an erroneous) example, here a `struct` variant name were used as a\nfunction:\n\n```compile_fail,E0423\nstruct Foo { a: bool };\n\nlet f = Foo();\n// error: expected function, found `Foo`\n// `Foo` is a struct name, but this expression uses it like a function name\n```\n\nPlease verify you didn't misspell the name of what you actually wanted to use\nhere. Example:\n\n```\nfn Foo() -> u32 { 0 }\n\nlet f = Foo(); // ok!\n```\n\nIt is common to forget the trailing `!` on macro invocations, which would also\nyield this error:\n\n```compile_fail,E0423\nprintln(\"\");\n// error: expected function, found macro `println`\n// did you mean `println!(...)`? (notice the trailing `!`)\n```\n\nAnother case where this error is emitted is when a value is expected, but\nsomething else is found:\n\n```compile_fail,E0423\npub mod a {\n    pub const I: i32 = 1;\n}\n\nfn h1() -> i32 {\n    a.I\n    //~^ ERROR expected value, found module `a`\n    // did you mean `a::I`?\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/empty/empty-struct-braces-expr.rs","byte_start":1073,"byte_end":1080,"line_start":31,"line_end":31,"column_start":15,"column_end":22,"is_primary":true,"text":[{"text":"    let xe1 = XEmpty1(); //~ ERROR expected function, found struct `XEmpty1`","highlight_start":15,"highlight_end":22}],"label":"did you mean `XEmpty2`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/empty/empty-struct-braces-expr.rs","byte_start":1073,"byte_end":1080,"line_start":31,"line_end":31,"column_start":15,"column_end":22,"is_primary":true,"text":[{"text":"    let xe1 = XEmpty1(); //~ ERROR expected function, found struct `XEmpty1`","highlight_start":15,"highlight_end":22}],"label":"did you mean `XEmpty1 { /* fields */ }`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0423]: expected function, found struct `XEmpty1`\n  --> /checkout/src/test/ui/empty/empty-struct-braces-expr.rs:31:15\n   |\nLL |     let xe1 = XEmpty1(); //~ ERROR expected function, found struct `XEmpty1`\n   |               ^^^^^^^\n   |               |\n   |               did you mean `XEmpty2`?\n   |               did you mean `XEmpty1 { /* fields */ }`?\n\n"}
[00:49:0doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/empty/empty-struct-braces-expr.rs","byte_start":1227,"byte_end":1237,"line_start":33,"line_end":33,"column_start":15,"column_end":25,"is_primary":true,"text":[{"text":"    let xe3 = XE::Empty3(); //~ ERROR no variant named `Empty3` found for type","highlight_start":15,"highlight_end":25}],"label":"variant not found in `empty_struct::XE`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"did you mean `empty_struct::XE::XEmpty3`?","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0599]: no variant named `Empty3` found for type `empty_struct::XE` in the current scope\n  --> /checkout/src/test/ui/empty/empty-struct-braces-expr.rs:33:15\n   |\nLL |     let xe3 = XE::Empty3(); //~ ERROR no variant named `Empty3` found for type\n   |               ^^^^^^^^^^ variant not found in `empty_struct::XE`\n   |\n   = note: did you mean `empty_struct::XE::XEmpty3`?\n\n"}
[00:49:07] {"message":"aborting due to 8 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 8 previous errors\n\n"}
[00:49:07] {"message":"Some errors occurred: E0423, E0599.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0423, E0599.\n"}
[00:49:07] {"message":"For more information about an errorde: 1
[00:49:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0599.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/E0599/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/E0599/auxiliary" "-A" "unused"
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"no associated item named `NotEvenReal` found for type `Foo` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0599.rs","byte_start":467,"byte_end":478,"line_start":11,"line_end":11,"column_start":1,"column_end":12,"is_primary":false,"text":[{"text":"struct Foo;","highlight_start":1,"highlight_end":12}],"label":"associated item `NotEvenReal` not found for this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/error-codes/E0599.rs","byte_start":506,"byte_end":524,"line_start":14,"line_end":14,"column_start":15,"column_end":33,"is_primary":true,"text":[{"text":"    || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599","highlight_start":15,"highlight_end":33}],"label":"associated item not found in `Foo`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no associated item named `NotEvenReal` found for type `Foo` in the current scope\n  --> /checkout/src/test/ui/error-codes/E0599.rs:14:15\n   |\nLL | struct Foo;\n   | ----------- associated item `NotEvenReal` not found for this\n...\nLL |     || if let Foo::NotEvenReal() = Foo {}; //~ ERROR E0599\n   |               ^^^^^^^^^^^^^^^^^^ associated item not found in `Foo`\n\n"}
[00:49:07] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/error-codes/E0599.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/invalid/invalid-path-in-const.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no associated item named `DOESNOTEXIST` found for type `u32` in the current scope
[00:49:07] -   --> $DIR/invalid-path-in-consre information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/invalid/invalid-path-in-const.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/issues/issue-22933-2.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no variant named `PIE` found for type `Delicious` in the current scope
[00:49:07] +   --> $DIR/issue-22933-2.rs:14:44
[00:49:07] 3    |
[00:49:07] 3    |
[00:49:07] 4 LL | enum Delicious {
[00:49:07] 5    | -------------- variant `PIE` not found here
[00:49:07] 6 ...
[00:49:07] 6 ...
[00:49:07] 7 LL |     ApplePie = Delicious::Apple as isize | Delicious::PIE as isize,
[00:49:07] -    |                                            |
[00:49:07] -    |                                            |
[00:49:07] -    |                                            variant not found in `Delicious`
[00:49:07] +    |                                            ^^^^^^^^^^^^^^ variant not found in `Delicious`
[00:49:07] 12 error: aborting due to previous error
[00:49:07] 13 
[00:49:07] 
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-22933-2/issue-22933-2.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args issues/issue-22933-2.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-22933-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/issues/issue-22933-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/issues/issue-22933-2/auxiliary" "-A" "unused"
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"no variant named `PIE` found for type `Delicious` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-22933-2.rs","byte_start":467,"byte_end":481,"line_start":11,"line_end":11,"column_start":1,"column_end":15,"is_primary":false,"text":[{"text":"enum Delicious {","highlight_start":1,"highlight_end":15}],"label":"variant `PIE` not found here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-22933-2.rs","byte_start":567,"byte_end":581,"line_start":14,"line_end":14,"column_start":44,"column_end":58,"is_primary":true,"text":[{"text":"    ApplePie = Delicious::Apple as isize | Delicious::PIE as isize,","highlight_start":44,"highlight_end":58}],"label":"variant not found in `Delicious`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no variant named `PIE` found for type `Delicious` in the current scope\n  --> /checkout/src/test/ui/issues/issue-22933-2.rs:14:44\n   |\nLL | enum Delicious {\n   | -------------- variant `PIE` not found here\n...\nLL |     ApplePie = Delicious::Apple as isize | Delicious::PIE as isize,\n   |                                            ^^^^^^^^^^^^^^ variant not found in `Delicious`\n\n"}
[00:49:07] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/issues/issue-22933-2.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/issues/issue-22933-3.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no associated item named `Mplain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/issues/issue-22933-3.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/issues/issue-23173.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no variant named `Homura` found for type `Token` in the current scope
[00:49:07] +   --> $DIR/issue-23173.rs:19:16
[00:49:07] 3    |
[00:49:07] 3    |
[00:49:07] 4 LL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
[00:49:07] 5    | ---------- variant `Homura` not found here
[00:49:07] 6 ...
[00:49:07] 6 ...
[00:49:07] 7 LL |     use_token(&Token::Homura);
[00:49:07] -    |                |
[00:49:07] -    |                variant not found in `Token`
[00:49:07] +    |                ^^^^^^^^^^^^^ variant not found in `Token`
[00:49:07] 11 
[00:49:07] 11 
[00:49:07] 12 error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope
[00:49:07] +   --> $DIR/issue-23173.rs:21:5
[00:49:07] 14    |
[00:49:07] 14    |
[00:49:07] 15 LL | struct Struct {
[00:49:07] 16    | ------------- function or associated item `method` not found for this
[00:49:07] 17 ...
[00:49:07] 17 ...
[00:49:07] 18 LL |     Struct::method();
[00:49:07] -    |     |
[00:49:07] -    |     function or associated item not found in `Struct`
[00:49:07] -    |     function or associated item not found in `Struct`
[00:49:07] +    |     ^^^^^^^^^^^^^^ function or associated item not found in `Struct`
[00:49:07] 22 
[00:49:07] 23 error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope
[00:49:07] +   --> $DIR/issue-23173.rs:23:5
[00:49:07] 25    |
[00:49:07] 25    |
[00:49:07] 26 LL | struct Struct {
[00:49:07] 27    | ------------- function or associated item `method` not found for this
[00:49:07] 28 ...
[00:49:07] 28 ...
[00:49:07] 29 LL |     Struct::method;
[00:49:07] -    |     |
[00:49:07] -    |     function or associated item not found in `Struct`
[00:49:07] -    |     function or associated item not found in `Struct`
[00:49:07] +    |     ^^^^^^^^^^^^^^ function or associated item not found in `Struct`
[00:49:07] 33 
[00:49:07] 34 error[E0599]: no associated item named `Assoc` found for type `Struct` in the current scope
[00:49:07] +   --> $DIR/issue-23173.rs:25:5
[00:49:07] 36    |
[00:49:07] 36    |
[00:49:07] 37 LL | struct Struct {
[00:49:07] 38    | ------------- associated item `Assoc` not found for this
[00:49:07] 39 ...
[00:49:07] 39 ...
[00:49:07] 40 LL |     Struct::Assoc;
[00:49:07] -    |     |
[00:49:07] -    |     associated item not found in `Struct`
[00:49:07] +    |     ^^^^^^^^^^^^^ associated item not found in `Struct`
[00:49:07] 44 
[00:49:07] 44 
[00:49:07] 45 error: aborting due to 4 previous errors
[00:49:07] 46 
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-23173/issue-23173.stderr
[00:49:07] To update references, rerun the tests us, Minus, /* etc */ }","highlight_start":1,"highlight_end":11}],"label":"variant `Homura` not found here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-23173.rs","byte_start":638,"byte_end":651,"line_start":19,"line_end":19,"column_start":16,"column_end":29,"is_primary":true,"text":[{"text":"    use_token(&Token::Homura);","highlight_start":16,"highlight_end":29}],"label":"variant not found in `Token`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no variant named `Homura` found for type `Token` in the current scope\n  --> /checkout/src/test/ui/issues/issue-23173.rs:19:16\n   |\nLL | enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }\n   | ---------- variant `Homura` not found here\n...\nLL |     use_token(&Token::Homura);\n   |                ^^^^^^^^^^^^^ variant not found in `Token`\n\n"}
[00:49:07] {"message":"no function or associated item named `method` found for type `Struct` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-23173.rs","byte_start":528,"byte_end":541,"line_start":12,"line_end":12,"column_start":1,"column_end":14,"is_primary":false,"text":[{"text":"struct Struct {"truct Struct {","highlight_start":1,"highlight_end":14}],"label":"function or associated item `method` not found for this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-23173.rs","byte_start":797,"byte_end":811,"line_start":23,"line_end":23,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"    Struct::method;","highlight_start":5,"highlight_end":19}],"label":"function or associated item not found in `Struct`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no function or associated item named `method` found for type `Struct` in the current scope\n  --> /checkout/src/test/ui/issues/issue-23173.rs:23:5\n   |\nLL | struct Struct {\n   | ------------- function or associated item `method` not found for this\n...\nLL |     Struct::method;\n   |     ^^^^^^^^^^^^^^ function or associated item not found in `Struct`\n\n"}
[00:49:07] {"message":"no associated item named `Assoc` found for type `Struct` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-23173.rs","byte_start":528,"byte_end":541,"line_start":12,"line_end":12,"column_start":1,"column_end":14,"is_primary":false,"text":[{"text":"struct Struct {","highlight_start":1,"highlight_end":14}],"label":"associated item `Assoc` not found for this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-23173.rs","byte_start":893,"byte_end":906,"line_start":25,"line_end":25,"column_start":5,"column_end":18,"is_primary":true,"text":[{"text":"    Struct::Assoc;","highlight_start":5,"highlight_end":18}],"label":"associated item not found in `Struct`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no associated item named `Assoc` found for type `Struct` in the current scope\n  --> /checkout/src/test/ui/issues/issue-23173.rs:25:5\n   |\nLL | struct Struct {\n   | ------------- associated item `Assoc` not found for this\n...\nLL |     Struct::Assoc;\n   |     ^^^^^^^^^^^^^ associated item not found in `Struct`\n\n"}
[00:49:07] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/issues/issue-23173.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/issues/issue-23217.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07 found in `dyn std::ops::BitXor<_>`
[00:49:07] +    |                 ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>`
[00:49:07] 14    |
[00:49:07] 15    = help: did you mean `bitxor`?
[00:49:07] 
[00:49:07] 
[00:49:07] 21    |             ^^^^^^^^^^^^^ associated type `Output` must be specified
[00:49:07] 22 
[00:49:07] 23 error[E0599]: no function or associated item named `bitor` found for type `dyn std::ops::BitXor<_>` in the current scope
[00:49:07] +   --> $DIR/issue-28344.rs:18:13
[00:49:07] 25    |
[00:49:07] 25    |
[00:49:07] 26 LL |     let g = BitXor::bitor;
[00:49:07] -    |             |
[00:49:07] -    |             |
[00:49:07] -    |             function or associated item not found in `dyn std::ops::BitXor<_>`
[00:49:07] +    |             ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>`
[00:49:07] 30    |
[00:49:07] 31    = help: did you mean `bitxor`?
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-28344/issue-28344.stderr
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-28344/issue-28344.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args issues/issue-28344.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-28344.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/issues/issue-28344/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/issues/issue-28344/auxiliary" "-A" "unused"
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"the value of the associated type `Output` (from the trait `std::ops::BitXor`) 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/issues/issue-28344.rs","byte_start":518,"byte_end":531,"line_start":14,"line_end":14,"column_start":17,"column_end":30,"is_primary":true,"text":[{"text":"    let x: u8 = BitXor::bitor(0 as u8, 0 as u8);","highlight_start":17,"highlight_end":30}],"label":"associated type `Output` must be specified","suggested_replacement":null,"suggestion_:bitor(0 as u8, 0 as u8);\n   |                 ^^^^^^^^^^^^^ function or associated item not found in `dyn std::ops::BitXor<_>`\n   |\n   = help: did you mean `bitxor`?\n\n"}
[00:49:07] {"message":"the value of the associated type `Output` (from the trait `std::ops::BitXor`) 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/issues/issue-28344.rs","byte_start":643,"byte_end":656,"line_start":18,"line_end":18,"column_start":13,"column_end":26,"is_primary":true,"text":[{"text":"    let g = BitXor::bitor;","highlight_start":13,"highlight_end":26}],"label":"associated type `Output` must be specified","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0191]: the value of the associated type `Output` (from the trait `std::ops::BitXor`) must be specified\n  --> /checkout/src/test/ui/issues/issue-28344.rs:18:13\n   |\nLL |     let g = BitXor::bitor;\n   |             ^^^^^^^^^^^^^ associated type `Output` must be specified\n\n"}
[00:49:07] {"message":"no function or associated item named `bitor` found for type `dyn std::ops::Bage":"For more information about an error, try `rustc --explain E0191`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0191`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/issues/issue-28344.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/issues/issue-28586.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no associated item named `BYTES` found for type `usize` in the current scope
[00:49:07] +   --> $DIR/issue-28586.rs:14:19
[00:49:07] 3    |
[00:49:07] 3    |
[00:49:07] 4 LL | impl Foo for [u8; usize::BYTES] {}
[00:49:07] -    |                   |
[00:49:07] -    |                   associated item not found in `usize`
[00:49:07] +    |                   ^^^^^^^^^^^^ associated item not found in `usize`
[00:49:07] 8 
[00:49:07] 8 
[00:49:07] 9 error: aborting due to previous error
[00:49:07] 10 
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-28586/issue-28586.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args issues/issue-28586.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/obj/bui `usize` in the current scope\n  --> /checkout/src/test/ui/issues/issue-28586.rs:14:19\n   |\nLL | impl Foo for [u8; usize::BYTES] {}\n   |                   ^^^^^^^^^^^^ associated item not found in `usize`\n\n"}
[00:49:07] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/issues/issue-28586.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/issues/issue-28971.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no variant named `Baz` found for type `Foo` in the current scope
[00:49:07] +   --> $DIR/issue-28971.rs:19:13
[00:49:07] 3    |
[00:49:07] 3    |
[00:49:07] 4 LL | enum Foo {
[00:49:07] 5    | -------- variant `Baz` not found here
[00:49:07] 6 ...
[00:49:07] 6 ...
[00:49:07] 7 LL |             Foo::Baz(..) => (),
[00:49:07] -    |             -----^^^---- variant not found in `Foo`
[00:49:07] +    |             ^^^^^^^^^^^^ variant not found in `Foo`
[00:49:07] -    = help: did you mean `Bar`?
[00:49:07] -    = help: did you mean `Bar`?
[00:49:07] +    = note: did you mean `Foo::Bar`?
[00:49:07] 12 error: aborting due to previous error
[00:49:07] 13 
[00:49:07] 
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-28971/issue-28971.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args issues/issue-28971.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-28971.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/issues/issue-28971/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/issues/issue-28971/auxiliary" "-A" "unused"
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"no variant named `Baz` found for type `Foo` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level"unction or associated item named `new_undirected` found for type `issue_30123_aux::Graph<i32, i32>` in the current scope\n  --> /checkout/src/test/ui/issues/issue-30123.rs:17:14\n   |\nLL |     let ug = Graph::<i32, i32>::new_undirected();\n   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `issue_30123_aux::Graph<i32, i32>`\n\n"}
[00:49:07] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/issues/issue-30123.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/issues/issue-38919.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no associated item named `Item` found for type `T` in the current scope
[00:49:07] -   --> $DIR/issue-38919.rs:12:8
[00:49:07] +   --> $DIR/issue-38919.rs:12:5
[00:49:07] 3    |
[00:49:07] 4 LL |     T::Item; //~ ERROR no associated item named `Item` found for type `T` in the current scope
[00:49:07] -    |     ---^^^^
[00:49:07] -    |     associated item not found in `T`
[00:49:07] +    |     ^^^^^^^ associated item not found in `T`
[00:49:07] 8 
[00:49:07] 9 error: aborting due to previous error
[00:49:07] 9 error: aborting due to previous error
[00:49:07] 10 
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-38919/issue-38919.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args issues/issue-38919.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-38919.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/issues/issue-38919/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/issues/issue-38919/auxiliary" "-A" "unused"
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"no associated item named `Item` found for type `T` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-38919.rs","byte_start":495,"byte_end":502,"line_start":12,"line_end":12,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":"    T::Item; //~ ERROR no associated item named `Item` found for type `T` in the current scope","highlight_start":5,"highlight_end":12}],"label":"associated item not found in `T`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no associated item named `Item` found for type `T` in the current scope\n  --> /checkout/src/test/ui/issues/issue-38919.rs:12:5\n   |\nLL |     T::Item; //~ ERROR no associated item named `Item` found for type `T` in the current scope\n   |     ^^^^^^^ associated item not found in `T`\n\n"}
[00:49:07] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/issues/issue-38919.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/issues/issue-39559.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no function or associated item named `dim` found for type `D` in the current scop        ^^^^^^ function or associated item not found in `D`\n   |\n   = help: items from traits can only be used if the trait is implemented and in scope\n   = note: the following trait defines an item `dim`, perhaps you need to implement it:\n           candidate #1: `Dim`\n\n"}
[00:49:07] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
---
[00:49:07] 29 error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope
[00:49:07] -   --> $DIR/trait-import-suggestions.rs:40:18
[00:49:07] +   --> $DIR/trait-import-suggestions.rs:40:13
[00:49:07] 31    |
[00:49:07] 32 LL |     let y = u32::from_str("33"); //~ ERROR no function or associated item named `from_str`
[00:49:07] -    |             |
[00:49:07] -    |             function or associated item not found in `u32`
[00:49:07] -    |             function or associated item not found in `u32`
[00:49:07] +    |             ^^^^^^^^^^^^^ function or associated item not found in `u32`
[00:49:07] 37    = help: items from traits can only be used if the trait is in scope
[00:49:07] 38 help: the following trait is implemented but not in scope, perhaps add a `use` for it:
[00:49:07] 
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rust-2018/trait-import-suggestions/trait-import-suggestions.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args rust-2018/trait-import-suggestions.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/onsion":null}],"children":[{"message":"items from traits can only be used if the trait is in scope","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"the following trait is implemented but not in scope, perhaps add a `use` for it:\n`use crate::foo::foobar::Foobar;`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0599]: no method named `foobar` found for type `u32` in the current scope\n  --> /checkout/src/test/ui/rust-2018/trait-import-suggestions.rs:32:11\n   |\nLL |         x.foobar(); //~ ERROR no method named `foobar`\n   |           ^^^^^^\n   |\n   = help: items from traits can only be used if the trait is in scope\n   = note: the following trait is implemented but not in scope, perhaps add a `use` for it:\n           `use crate::foo::foobar::Foobar;`\n\n"}
[00:49:07] {"message":"no method named `bar` found for type `u32` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/trait-import-suggestions.rs","byte_start":952,"byte_end":955,"line_start":38,"line_end":38,"column_start":7,"column_end":10,"is_primary":true,"text":[{"text":"    x.bar(); //~ ERROR no method named `bar`","highlight_start":7,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicabilit/ui/rust-2018/trait-import-suggestions.rs","byte_start":997,"byte_end":1000,"line_start":39,"line_end":39,"column_start":7,"column_end":10,"is_primary":true,"text":[{"text":"    x.baz(); //~ ERROR no method named `baz`","highlight_start":7,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no method named `baz` found for type `u32` in the current scope\n  --> /checkout/src/test/ui/rust-2018/trait-import-suggestions.rs:39:7\n   |\nLL |     x.baz(); //~ ERROR no method named `baz`\n   |       ^^^\n\n"}
[00:49:07] {"message":"no function or associated item named `from_str` found for type `u32` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/trait-import-suggestions.rs","byte_start":1048,"byte_end":1061,"line_start":40,"line_end":40,"column_start":13,"column_end":26,"is_primary":true,"text":[{"text":"    let y = u32::from_str(\"33\"); //~ ERROR no function or associated item named `from_str`","highlight_start":13,"highlight_end":26}],"label":"function or associated item not found in `u32`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"items from traits can only be used if the trait is in scope","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"the following trait is implemented but not in scope, perhaps add a `use` for it:","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/trait-import-suggestions.rs","byte_start":576,"byte_end":576,"line_start":15,"line_end":15,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"mod foo {","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::str::FromStr;\n\n","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope\n  --> /checkout/src/test/ui/rust-2018/trait-import-suggestions.rs:40:13\n   |\nLL |     let y = u32::from_str(\"33\"); //~ ERROR no function or associated item named `from_str`\n   |             ^^^^^^^^^^^^^ function or associated item not found in `u32`\n   |\n   = help: items from traits can only be used if the trait is in scope\nhelp: the following trait is implemented but not in scope, perhaps add a `use` for it:\n   |\nLL | use std::str::FromStr;\n   |\n\n"}
[00:49:07] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:49:07] {"message":"For more information about this error, try `rustc --explain E0599`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0599`.\n"}
[00:49:07] --------------------------------:49:07] stdout:
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"no method named `a` found for type `S` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":506,"byte_end":515,"line_start":13,"line_end":13,"column_start":1,"column_end":10,"is_primary":false,"text":[{"text":"struct S;","highlight_start":1,"highlight_end":10}],"label":"method `a` not found for this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":1449,"byte_end":1450,"line_start":77,"line_end":77,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":"    S.a(); //~ ERROR no method named `a` found for type `S` in the current scope","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"items from traits can only be used if the trait is implemented and in scope","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"the following trait defines an item `a`, perhaps you need to implement it:\ncandidate #1: `method::A`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0599]: no method named `a` found for type `S` in the current scope\n  --> /checkout/src/test/ui/traits/trait-item-privacy.rs:77:7\n   |\nLL | struct S;\n   | --------- method `a` not found for this\n...\nLL |     S.a(); //~ ERROR no method named `a` found for type `S` in the current scope\n   |       ^\n   |\n   = help: items from traits can only be used if the trait is implemented and in scope\n   = note: the following trait defines an item `a`, perhaps you need to implement it:\n           candidate #1: `method::A`\n\n"}
[00:49:07] {"message":"no method named `b` found for type `S` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":506,"byte_end":515,"line_start":13,"line_end":13,"column_start":1,"column_end":10,"is_primary":false,"text":[{"text":"struct S;","highlight_start":1,"highlight_end":10}],"label":"method `b` not found for this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":1530,"byte_end":1531,"line_start":78,"line_end":78,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":"    S.b(); //~ ERROR no method named `b` found for type `S` in the current scope","highlight_start":7,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"items from traits can only be used if the trait is in scope","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"the following trait is implemented but not in scope, perhaps add a `use` for it:","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":506,"byte_end":506,"line_start":13,"line_end":13,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"struct S;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use method::B;\n\n","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0599]: no method named `b` found for type `S` in the current scope\n  --> /checkout/src/test/ui/traits/trait-item-privacy.rs:78:7\n   |\nLL | struct S;\n   | --------- method `b` not found for this\n...\nLL |     S.b(); //~ ERROR no method named `b` found for type `S` in the current scope\n   |       ^\n   |\n   = help: items from traits can only be used if the trait is in scope\nhelp: the following trait is implemented but not in scope, perhaps add a `use` for it:\n   |\nLL | use method::B;\n   |\n\n"}
[00:49:07] {"message":"method `a` is private","code":{"code":"E0624","explanation":"\nA private item was used outside of its scope.\n\nErroneous code example:\n\n```compile_fail,ted item `a` not found for this\n...\nLL |     S::a(&S);\n   |     ^^^^ function or associated item not found in `S`\n   |\n   = help: items from traits can only be used if the trait is implemented and in scope\n   = note: the following trait defines an item `a`, perhaps you need to implement it:\n           candidate #1: `method::A`\n\n"}
[00:49:07] {"message":"no function or associated item named `b` found for type `S` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":506,"byte_end":515,"line_start":13,"line_end":13,"column_start":1,"column_end":10,"is_primary":false,"text":[{"text":"struct S;","highlight_start":1,"highlight_end":10}],"label":"function or associated item `b` not found for this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":1999,"byte_end":2003,"line_start":90,"line_end":90,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    S::b(&S);","highlight_start":5,"highlight_end":9}],"label":"function or associated item not found in `S`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"items from traits can only be used if the trait is in scope","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"the following trait is implemented but not in scope, perhaps add a `use` for it:","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":506,"byte_end":506,"line_start":13,"line_end":13,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"struct S;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use method::B;\n\n","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0599]: no function or associated item named `b` found for type `S` in the current scope\n  --> /checkout/src/test/ui/traits/trait-item-privacy.rs:90:5\n   |\nLL | struct S;\n   | --------- function or associated item `b` not found for this\n...\nLL |     S::b(&S);\n   |     ^^^^ function or associated item not found in `S`\n   |\n   = help: items from traits can only be used if the trait is in scope\nhelp: the following trait is implemented but not in scope, perhaps add a `use` for it:\n   |\nLL | use method::B;\n   |\n\n"}
[00:49:07] {"message":"method `a` is private","code":{"code":"E0624","explanation":"\nA private item was used outside of its scope.\n\nErroneous code example:\n\n```compile_fail,E0624\nmod inner {\n    pub struct Foo;\n\n    impl Foo {\n        fn method(&self) {}\n    }\n}\n\nlet foo = inner::Foo;\nfoo.method(); // error: method `method` is private\n```\n\nTwo possibilities are available to solve this issue:\n\n1. Only use the item in the scope it has been defined:\n\n```\nmod innerout/src/test/ui/traits/trait-item-privacy.rs","byte_start":506,"byte_end":515,"line_start":13,"line_end":13,"column_start":1,"column_end":10,"is_primary":false,"text":[{"text":"struct S;","highlight_start":1,"highlight_end":10}],"label":"associated item `A` not found for this","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":2522,"byte_end":2526,"line_start":107,"line_end":107,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    S::A; //~ ERROR no associated item named `A` found for type `S` in the current scope","highlight_start":5,"highlight_end":9}],"label":"associated item not found in `S`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"items from traits can only be used if the trait is implemented and in scope","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"the following trait defines an item `A`, perhaps you need to implement it:\ncandidate #1: `assoc_const::A`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0599]: no associated item named `A` found for type `S` in the current scope\n  --> /checkout/src/test/ui/traits/trait-item-privacy.rs:107:5\n   |\nLL | struct S;\n   | --------- associated item `A` not found for this\n...\nLL |     S::A; //~ ERROR no associated item named `A` found for type `S` in the current scope\n   |     ^^^^ associated item not found in `S`\n   |\n   = help: items from traits can only be used if the trait is implemented and in scope\n   = for it:","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":506,"byte_end":506,"line_start":13,"line_end":13,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"struct S;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use assoc_const::B;\n\n","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0599]: no associated item named `B` found for type `S` in the current scope\n  --> /checkout/src/test/ui/traits/trait-item-privacy.rs:108:5\n   |\nLL | struct S;\n   | --------- associated item `B` not found for this\n...\nLL |     S::B; //~ ERROR no associated item named `B` found for type `S` in the current scope\n   |     ^^^^ associated item not found in `S`\n   |\n   = help: items from traits can only be used if the trait is in scope\nhelp: the following trait is implemented but not in scope, perhaps add a `use` for it:\n   |\nLL | use assoc_const::B;\n   |\n\n"}
[00:49:07] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:503:22
[00:49:07] {"message":"associated constant `A` is private","code":{"code":"E0624","explanation":"\nA private item was used outside of its scope.\n\nErroneous code example:\n\n```compile_fail,E0624\nmod inner {\n    pub struct Foo;\n\n    impl Foo {\n        fn method(&self) {}\n    }\n}\n\nlet foo = inner::Foo;\nfoo.method(); // error: method `method` is private\n```\n\nTwo possibilities are available to solve this issue:\n\n1. Only use the item in the scope it has been defined:\n\n```\nmod inner {\n    pub struct Foo;\n\n    impl Foo {\n        fn method(&self) {}\n    }\n\n    pub fn call_method(foo: &Foo) { // We create a public function.\n        foo.method(); // Which calls the item.\n    }\n}\n\nlet foo = inner::Foo;\ninner::call_method(&foo); // And since the function is public, we can call the\n                          // method through it.\n```\n\n2. Make the item public:\n\n```\nmod inner {\n    pub struct Foo;\n\n    impl Foo {\n        pub fn method(&self) {} // It's now public.\n    }\n}\n\nlet foo = inner::Foo;\nfoo.method(); // Ok!\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":2802,"byte_end":2806,"line_start":111,"line_end":111,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    C::A; //~ ERROR associated constant `A` is private","highlight_start":5,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0624]: associated constant `A` is private\n  --> /checkout/src/test/ui/traits/trait-item-privacy.rs:111:5\n   |\nLL |     C::A; //~ ERROR associated constant `A` is private\n   |     ^^^^\n\n"}
[00:49:07] {"message":"the trait `assoc_const::C` cannot be made into an object","code":{"code":"E0038","explanation":"\nTrait objects like `Box<Trait>` can only be constructed when certain\nrequirements are satisfied by the trait in question.\n\nTrait objects are a form of dynamic dispatch and use a dynamically sized type\nfor the inner type. So, for a given trait `Trait`, when `Trait` is treated as a\ntype, as in `Box<Trait>`, the inner type hods of\n`Trait`, we need to create such a table, for each different type fed to\n`foo()`. In this case this turns out to be (10 types implementing `Trait`)*(3\ntypes being fed to `foo()`) = 30 implementations!\n\nWith real world traits these numbers can grow drastically.\n\nTo fix this, it is suggested to use a `where Self: Sized` bound similar to the\nfix for the sub-error above if you do not intend to call the method with type\nparameters:\n\n```\ntrait Trait {\n    fn foo<T>(&self, on: T) where Self: Sized;\n    // more methods\n}\n```\n\nIf this is not an option, consider replacing the type parameter with another\ntrait object (e.g., if `T: OtherTrait`, use `on: Box<OtherTrait>`). If the\nnumber of types you intend to feed to this method is limited, consider manually\nlisting out the methods of different types.\n\n### Method has no receiver\n\nMethods that do not take a `self` parameter can't be called since there won't be\na way to get a pointer to the method table for them.\n\n```\ntrait Foo {\n    fn foo() -> u8;\n}\n```\n\nThis could be called as `<Foo as Foo>::foo()`, which would not be able to pick\nan implementation.\n\nAdding a `Self: Sized` bound to these methods will generally make this compile.\n\n```\ntrait Foo {\n    fn foo() -> u8 where Self: Sized;\n}\n```\n\n### The trait cannot contain associated constants\n\nJust like static functions, associated constants aren't stored on the method\ntable. If the trait or any subtrait contain an associated constant, they cannot\nbe made into an object.\n\n```compile_fail,E0038\ntrait Foo {\n    const X: i32;\n}\n\nimpl Foo {}\n```\n\nA simple workaround is to use a helper method instead:\n\n```\ntrait Foo {\n    fn x(&self) -> i32;\n}\n```\n\n### The trait cannot use `Self` as a type parameter in the supertrait listing\n\nThis is similar to the second sub-error, but subtler. It happens in situations\nlike the following:\n\n```compile_fail\ntrait Super<A> {}\n\ntrait Trait: Super<Self> {\n}\n\nstruct Foo;\n\nimpl Super<Foo> for Foo{}\n\nimpl Trait for Foo {}\n```\n\nHere, the supertrait might have methods as follows:\n\n```\ntrait Super<A> {\n    fn get_a(&self) -> A; // note that this is object safe!\n}\n```\n\nIf the trait `Foo` was deriving from something like `Super<String>` or\n`Super<T>` (where `Foo` itself is `Foo<T>`), this is okay, because given a type\n`get_a()` will definitely return an object of that type.\n\nHowever, if it derives from `Super<Self>`, even though `Super` is object safe,\nthe method `get_a()` would return an object of unknown type when called on the\nfunction. `Self` type parameters let us make object safe traits no longer safe,\nso they are forbidden when specifying supertraits.\n\nThere's no easy fix for this, generally code will need to be refactored so that\nyou no longer need to derive from `Super<Self>`.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":2802,"byte_end":2806,"line_start":111,"line_end":111,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    C::A; //~ ERROR associated constant `A` is private","highlight_start":5,"highlight_end":9}],"label":"the trait `assoc_const::C` cannot be made into an object","suggested_replacement":null,"suggestion_applicability":null,"expansin```compile_fail,E0223\ntrait MyTrait {type X; }\n\nfn main() {\n    let foo: MyTrait::X;\n}\n```\n\nThe problem here is that we're attempting to take the type of X from MyTrait.\nUnfortunately, the type of X is not defined, because it's only made concrete in\nimplementations of the trait. A working version of this code might look like:\n\n```\ntrait MyTrait {type X; }\nstruct MyStruct;\n\nimpl MyTrait for MyStruct {\n    type X = u32;\n}\n\nfn main() {\n    let foo: <MyStruct as MyTrait>::X;\n}\n```\n\nThis syntax specifies that we want the X type from MyTrait, as made concrete in\nMyStruct. The reason that we cannot simply use `MyStruct::X` is that MyStruct\nmight implement two different traits with identically-named associated types.\nThis syntax allows disambiguation between the two.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":3356,"byte_end":3360,"line_start":126,"line_end":126,"column_start":12,"column_end":16,"is_primary":true,"text":[{"text":"    let _: S::B; //~ ERROR ambiguous associated type","highlight_start":12,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"use fully-qualified syntax","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":3356,"byte_end":3360,"line_start":126,"line_end":126,"column_start":12,"column_end":16,"is_primary":true,"text":[{"text":"    let _: S::B; //~ ERROR ambiguous associated type","highlight_start":12,"highlight_end":16}],"label":null,"suggested_replacement":"<S as Trait>::B","suggestion_applicability":"HasPlaceholders","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0223]: ambiguous associated type\n  --> /checkout/src/test/ui/traits/trait-item-privacy.rs:126:12\n   |\nLL |     let _: S::B; //~ ERROR ambiguous associated type\n   |            ^^^^ help: use fully-qualified syntax: `<S as Trait>::B`\n\n"}
[00:49:07] {"message":"ambiguous associated type","code":{"code":"E0223","explanation":"\nAn attempt was made to retrieve an associated type, but the type was ambiguous.\nFor example:\n\n```compile_fail,E0223\ntrait MyTrait {type X; }\n\nfn main() {\n    let foo: MyTrait::X;\n}\n```\n\nThe problem here is that we're attempting to take the type of X from MyTrait.\nUnfortunately, the type of X is not defined, because it's only made concrete in\nimplementations of the trait. A working version of this code might look like:\n\n```\ntrait MyTrait {type X; }\nstruct MyStruct;\n\nimpl MyTrait for MyStruct {\n    type X = u32;\n}\n\nfn main() {\n    let foo: <MyStruct as MyTrait>::X;\n}\n```\n\nThis syntax specifies that we want the X type from MyTrait, as made concrete in\nMyStruct. The reason that we cannot simply use `MyStruct::X` is that MyStruct\nmight implement two different traits with identically-named associated types.\nThis syntax allows disambiguation between the two.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":3409,"byte_end":3413,"line_start":127,"line_end":127,"column_start":12,"column_end":16,"is_primary":true,"text":[{"text":"    let _: S::C; //~ ERROR ambiguous associated type","highlight_start":12ssociated type `A` is private","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-item-privacy.rs","byte_start":3751,"byte_end":3757,"line_start":138,"line_end":138,"column_start":9,"column_end":15,"is_primary":true,"text":[{"text":"        A = u8, //~ ERROR associated type `A` is private","highlight_start":9,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: associated type `A` is private\n  --> /checkout/src/test/ui/traits/trait-item-privacy.rs:138:9\n   |\nLL |         A = u8, //~ ERROR associated type `A` is private\n   |         ^^^^^^\n\n"}
[00:49:07] {"message":"aborting due to 15 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 15 previous errors\n\n"}
[00:49:07] {"message":"Some errors occurred: E0038, E0223, E0599, E0624.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0038, E0223, E0599, E0624.\n"}
[00:49:07] {"message":"For more information about an error, try `rustc --explain E0038`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0038`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/traits/trait-item-privacy.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/ufcs/ufcs-partially-resolved.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 187    |            ^^^^^^^^^^^^^^^^^  `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args ufcs/ufcs-partially-resolved.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
[00:49:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/ufcs/ufcs-partially-resolved.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/ufcs/ufcs-partially-resolved/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/ufcs/ufcs-partially-resolved/auxiliary" "-A" "unused"
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] ------------------------------------------
[00:49:07] stderr:
[00:49:07] stderr:
[00:49:07] ------------------------------------------
[00:49:07] {"message":"failed to resolve: not a module `Y`","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/ufcs/ufcs-partially-resolved.rs","byte_start":2820,"byte_end":2821,"line_start":58,"line_end":58,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let _: <u8 as E::Y>::NN; //~ ERROR failed to resolve: not a module `Y`","highlight_start":22,"highlight_end":23}],"label":"not a module `Y`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0433]: failed to resolve: not a module `Y`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:58:22\n   |\nLL |     let _: <u8 as E::Y>::NN; //~ ERROR failed to resolve: not a module `Y`\n   |                      ^ not a module `Y`\n\n"}
[00:49:07] {"message":"failed to resolve: not a module `Y`","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/ufcs/ufcs-partially-resolved.rs","byte_start":2979,"byte_end":2980,"line_start":60,"line_end":60,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":"    <u8 as E::Y>::NN; //~ ERROR failed to resolve: not a module `Y`","highlight_start":15,"highlight_end":16}],"label":"not a module `Y`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0433]:"    <u8 as A>::N; //~ ERROR cannot find method or associated constant `N` in `A`","highlight_start":16,"highlight_end":17}],"label":"not found in `A`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0576]: cannot find method or associated constant `N` in `A`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:34:16\n   |\nLL |     <u8 as A>::N; //~ ERROR cannot find method or associated constant `N` in `A`\n   |                ^ not found in `A`\n\n"}
[00:49:07] {"message":"expected associated type, found variant `E::Y`","code":{"code":"E0575","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":1208,"byte_end":1220,"line_start":36,"line_end":36,"column_start":12,"column_end":24,"is_primary":true,"text":[{"text":"    let _: <u8 as E>::Y; //~ ERROR expected associated type, found variant `E::Y`","highlight_start":12,"highlight_end":24}],"label":"not a associated type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0575]: expected associated type, found variant `E::Y`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:36:12\n   |\nLL |     let _: <u8 as E>::Y; //~ ERROR expected associated type, found variant `E::Y`\n   |            ^^^^^^^^^^^^ not a associated type\n\n"}
[00:49:07] {"message":"expected method or associated constant, found unit variant `E::Y`","code":{"code":"E0575","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":1308,"byte_end":1320,"line_start":38,"line_end":38,"column_start":5,"column_end":17,"is_primary":true,"text":[{"text":"    <u8 as E>::Y; //~ ERROR expected method or associated constant, found unit variant `E::Y`","highlight_start":5,"highlight_end":17}],"label":"not a method or associated constant","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0575]: expected method or associated constant, found unit variant `E::Y`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:38:5\n   |\nLL |     <u8 as E>::Y; //~ ERROR expected method or associated constant, found unit variant `E::Y`\n   |     ^^^^^^^^^^^^ not a method or associated constant\n\n"}
[00:49:07] {"message":"cannot find associated type `N` in trait `Tr`","code":{"code":"E0576","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":1422,"byte_end":1423,"line_start":40,"line_end":40,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    let _: <u8 as Tr>::N::NN; //~ ERROR cannot find associated type `N` in trait `Tr`","highlight_start":24,"highlight_end":25}],"label":"did you mean `Y`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0576]: cannot find associated type `N` in trait `Tr`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:40:24\n   |\nLL |     let _: <u8 as Tr>::N::NN; //~ ERROR cannot find associated type `N` in trait `Tr`\n   |                        ^ did you mean `Y`?\n\n"}
[00:49:07] {"message":"cannot find associated type `N` in enum `E`","code":{"code":"E0576","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":1507,"byte_end":1508,"line_start":41,"line_end":41,"column_start":23,"column_end":24,"is_primary":true,"text":[{"text":"    let _: <u8 as E>::N::NN; //~ ERROR cannot find associated type `N` in enum `E`","highlight_start":23,"highlight_end":24}],"label":"not found in `E`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0576]: cannot find associated type `N` in enum `E`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:41:23\n   |\nLL |     let _: <u8 as E>::N::NN; //~ ERROR cannot find associated type `N` in enum `E`\n   |                       ^ not found in `E`\n\n"}
[00:49:07] {"message":"cannot find associated type `N` in `A`","code":{"code":"E0576","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":1590,"byte_end":1591,"line_start":42,"line_end":42,"column_start":23,"column_end":24,"is_primary":true,"text":[{"text":"    let _: <u8 as A>::N::NN; //~ ERROR cannot find associated type `N` in `A`","highlight_start":23,"highlight_end":24}],"label":"not found in `A`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0576]: cannot find associated type `N` in `A`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:42:23\n   |\nLL |     let _: <u8 as A>::N::NN; //~ ERROR cannot find associated type `N` in `A`\n   |                   12\n   |\nLL |     let _: <u8 as E>::Y::NN; //~ ERROR expected associated type, found variant `E::Y`\n   |            ^^^^^^^^^^^^^^^^ not a associated type\n\n"}
[00:49:07] {"message":"expected associated type, found variant `E::Y`","code":{"code":"E0575","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":2122,"byte_end":2138,"line_start":49,"line_end":49,"column_start":5,"column_end":21,"is_primary":true,"text":[{"text":"    <u8 as E>::Y::NN; //~ ERROR expected associated type, found variant `E::Y`","highlight_start":5,"highlight_end":21}],"label":"not a associated type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0575]: expected associated type, found variant `E::Y`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:49:5\n   |\nLL |     <u8 as E>::Y::NN; //~ ERROR expected associated type, found variant `E::Y`\n   |     ^^^^^^^^^^^^^^^^ not a associated type\n\n"}
[00:49:07] {"message":"cannot find associated type `NN` in `Tr::N`","code":{"code":"E0576","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":2224,"byte_end":2226,"line_start":51,"line_end":51,"column_start":27,"column_end":29,"is_primary":true,"text":[{"text":"    let _: <u8 as Tr::N>::NN; //~ ERROR cannot find associated type `NN` in `Tr::N`","highlight_start":27,"highlight_end":29}],"label":"not found in `Tr::N`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0576]: cannot find associated type `NN` in `Tr::N`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:51:27\n   |\nLL |     let _: <u8 as Tr::N>::NN; //~ ERROR cannot find associated type `NN` in `Tr::N`\n   |                           ^^ not found in `Tr::N`\n\n"}
[00:49:07] {"message":"cannot find associated type `NN` in `E::N`","code":{"code":"E0576","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":2307,"byte_end":2309,"line_start":52,"line_end":52,"column_start":26,"column_end":28,"is_primary":true,"text":[{"text":"    let _: <u8 as E::N>::NN; //~ ERROR cannot find associated type `NN` in `E::N`","highlight_start":26,"highlight_end":28}],"label":"not found in `E::N`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0576]: cannot find associated type `NN` in `E::N`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:52:26\n   |\nLL |     let _: <u8 as E::N>::NN; //~ ERROR cannot find associated type `NN` in `E::N`\n   |                          ^^ not found in `E::N`\n\n"}
[00:49:07] {"message":"cannot find associated type `NN` in `A::N`","code":{"code":"E0576","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":2389,"byte_end":2391,"line_start":53,"line_end":53,"column_start":26,"column_end":28,"is_primary":true,"text":[{"text":"    let _: <u8 as A::N>::NN; //~ ERROR cannot find associated type `NN` in `A::N`","highlight_start":26,"highlight_end":28}],"label":"not found in `A::N`","suggested_rep E::N>::NN; //~ ERROR cannot find method or associated constant `NN` in `E::N`","highlight_start":19,"highlight_end":21}],"label":"not found in `E::N`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0576]: cannot find method or associated constant `NN` in `E::N`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:55:19\n   |\nLL |     <u8 as E::N>::NN; //~ ERROR cannot find method or associated constant `NN` in `E::N`\n   |                   ^^ not found in `E::N`\n\n"}
[00:49:07] {"message":"cannot find method or associated constant `NN` in `A::N`","code":{"code":"E0576","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":2644,"byte_end":2646,"line_start":56,"line_end":56,"column_start":19,"column_end":21,"is_primary":true,"text":[{"text":"    <u8 as A::N>::NN; //~ ERROR cannot find method or associated constant `NN` in `A::N`","highlight_start":19,"highlight_end":21}],"label":"not found in `A::N`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0576]: cannot find method or associated constant `NN` in `A::N`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:56:19\n   |\nLL |     <u8 as A::N>::NN; //~ ERROR cannot find method or associated constant `NN` in `A::N`\n   |                   ^^ not found in `A::N`\n\n"}
[00:49:07] {"message":"cannot find associated type `NN` in `Tr::Y`","code":{"code":"E0576","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partiallciated type, found method `Dr::Z`","code":{"code":"E0575","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":3057,"byte_end":3058,"line_start":62,"line_end":62,"column_start":24,"column_end":25,"is_primary":false,"text":[{"text":"    let _: <u8 as Dr>::Z; //~ ERROR expected associated type, found method `Dr::Z`","highlight_start":24,"highlight_end":25}],"label":"did you mean `X`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":3045,"byte_end":3058,"line_start":62,"line_end":62,"column_start":12,"column_end":25,"is_primary":true,"text":[{"text":"    let _: <u8 as Dr>::Z; //~ ERROR expected associated type, found method `Dr::Z`","highlight_start":12,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0575]: expected associated type, found method `Dr::Z`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:62:12\n   |\nLL |     let _: <u8 as Dr>::Z; //~ ERROR expected associated type, found method `Dr::Z`\n   |            ^^^^^^^^^^^^-\n   |                        |\n   |                        did you mean `X`?\n\n"}
[00:49:07] {"message":"expected method or associated constant, found associated type `Dr::X`","code":{"code":"E0575","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":3133,"byte_end":3134,"line_start":63,"line_end":63,"column_start":17,"column_end":18,"is_primary":false,"text":[{"text":"    <u8 as Dr>::X; //~ ERROR expected method or associated constant, found associated type `Dr::X`","highlight_start":17,"highlight_end":18}],"label":"did you mean `Z`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":3121,"byte_end":3134,"line_start":63,"line_end":63,"column_start":5,"column_end":18,"is_primary":true,"text":[{"text":"    <u8 as Dr>::X; //~ ERROR expected method or associated constant, found associated type `Dr::X`","highlight_start":5,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"can't use a type alias as a constructor","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0575]: expected method or associated constant, found associated type `Dr::X`\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:63:5\n   |\nLL |     <u8 as Dr>::X; //~ ERROR expected method or associated constant, found associated type `Dr::X`\n   |     ^^^^^^^^^^^^-\n   |                 |\n   |                 did you mean `Z`?\n   |\n   = note: can't use a type alias as a constructor\n\n"}
[00:49:07] {"message":"expected associated type, found method `Dr::Z`","code":{"code":"E0575","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":3239,"byte_end":3240,"line_start":64,"line_end":64,"column_start":24,"column_end":25,"is_primary":false,"text":[{"text":"    let _: <u8 as Dr>::Z::N; e` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs","byte_start":3306,"byte_end":3322,"line_start":65,"line_end":65,"column_start":5,"column_end":21,"is_primary":true,"text":[{"text":"    <u8 as Dr>::X::N; //~ ERROR no associated item named `N` found for type `<u8 as Dr>::X`","highlight_start":5,"highlight_end":21}],"label":"associated item not found in `<u8 as Dr>::X`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no associated item named `N` found for type `<u8 as Dr>::X` in the current scope\n  --> /checkout/src/test/ui/ufcs/ufcs-partially-resolved.rs:65:5\n   |\nLL |     <u8 as Dr>::X::N; //~ ERROR no associated item named `N` found for type `<u8 as Dr>::X`\n   |     ^^^^^^^^^^^^^^^^ associated item not found in `<u8 as Dr>::X`\n\n"}
[00:49:07] {"message":"aborting due to 32 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 32 previous errors\n\n"}
[00:49:07] {"message":"Some errors occurred: E0223, E0433, E0575, E0576, E0599.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0223, E0433, E0575, E0576, E0599.\n"}
[00:49:07] {"message":"For more information about an error, try `rustc --explain E0223`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0223`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/ufcs/ufcs-partially-resolved.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
[00:49:07] 
[00:49:07] ---- [ui] ui/unspecified-self-in-trait-ref.rs stdout ----
[00:49:07] diff of stderr:
[00:49:07] 
[00:49:07] 1 error[E0599]: no function or associated item named `lol` found for type `dyn Foo<_>` in the current scope
[00:49:07] +   --> $DIR/unspecified-self-in-trait-ref.rs:20:13
[00:49:07] 3    |
[00:49:07] 3    |
[00:49:07] 4 LL |     let a = Foo::lol();
[00:49:07] -    |             |
[00:49:07] -    |             |
[00:49:07] -    |             function or associated item not found in `dyn Foo<_>`
[00:49:07] +    |             ^^^^^^^^ function or associated item not found in `dyn Foo<_>`
[00:49:07] 8 
[00:49:07] 9 error[E0599]: no function or associated item named `lol` found for type `dyn Foo<_>` in the current scope
[00:49:07] +   --> $DIR/unspecified-self-in-trait-ref.rs:22:13
[00:49:07] 11    |
[00:49:07] 11    |
[00:49:07] 12 LL |     let b = Foo::<_>::lol();
[00:49:07] -    |             |
[00:49:07] -    |             |
[00:49:07] -    |             function or associated item not found in `dyn Foo<_>`
[00:49:07] +    |             ^^^^^^^^^^^^^ function or associated item not found in `dyn Foo<_>`
[00:49:07] 16 
[00:49:07] 17 error[E0599]: no function or associated item named `lol` found for type `dyn Bar<_, _>` in the current scope
[00:49:07] +   --> $DIR/unspecified-self-in-trait-ref.rs:24:13
[00:49:07] 19    |
[00:49:07] 19    |
[00:49:07] 20 LL |     let c = Bar::lol();
[00:49:07] -    |             |
[00:49:07] -    |             |
[00:49:07] -    |             function or associated item not found in `dyn Bar<_, _>`
[00:49:07] +    |             ^^^^^^^^ function or associated item not found in `dyn Bar<_, _>`
[00:49:07] 24 
[00:49:07] 25 error[E0599]: no function or associated item named `lol` found for type `dyn Bar<usize, _>` in the current scope
[00:49:07] +   --> $DIR/unspecified-self-in-trait-ref.rs:26:13
[00:49:07] 27    |
[00:49:07] 27    |
[00:49:07] 28 LL |     let d = Bar::<usize, _>::lol();
[00:49:07] -    |             |
[00:49:07] -    |             |
[00:49:07] -    |             function or associated item not found in `dyn Bar<usize, _>`
[00:49:07] +    |             ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `dyn Bar<usize, _>`
[00:49:07] 32 
[00:49:07] 33 error[E0393]: the type parameter `A` must be explicitly specified
[00:49:07] 
[00:49:07] 
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] The actual stderr differed from the expected stderr.
[00:49:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/unspecified-self-in-trait-ref/unspecified-self-in-trait-ref.stderr
[00:49:07] To update references, rerun the tests and pass the `--bless` flag
[00:49:07] To only update this specific test, also pass `--test-args unspecified-self-in-trait-ref.rs`
[00:49:07] error: 1 errors occurred comparing output.
[00:49:07] status: exit code: 1
[00:49:07] status: exit code: 1
 Bar<_, _>` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/unspecified-self-in-trait-ref.rs","byte_start":749,"byte_end":757,"line_start":24,"line_end":24,"column_start":13,"column_end":21,"is_primary":true,"text":[{"text":"    let c = Bar::lol();","highlight_start":13,"highlight_end":21}],"label":"function or associated item not found in `dyn Bar<_, _>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no function or associated item named `lol` found for type `dyn Bar<_, _>` in the current scope\n  --> /checkout/src/test/ui/unspecified-self-in-trait-ref.rs:24:13\n   |\nLL |     let c = Bar::lol();\n   |             ^^^^^^^^ function or associated item not found in `dyn Bar<_, _>`\n\n"}
[00:49:07] {"message":"no function or associated item named `lol` found for type `dyn Bar<usize, _>` in the current scope","code":{"code":"E0599","explanation":"\nThis error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n               //        in the current scope\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/unspecified-self-in-trait-ref.rs","byte_start":825,"byte_end":845,"line_start":26,"line_end":26,"column_start":13,"column_end":33,"is_primary":true,"text":[{"text":"    let d = Bar::<usize, _>::lol();","highlight_start":13,"highlight_end":33}],"label":"function or associated item not found in `dyn Bar<usize, _>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0599]: no function or associated item named `lol` found for type `dyn Bar<usize, _>` in the current scope\n  --> /checkout/src/test/ui/unspecified-self-in-trait-ref.rs:26:13\n   |\nLL |     let d = Bar::<usize, _>::lol();\n   |             ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `dyn Bar<usize, _>`\n\n"}
[00:49:07] {"message":"the type parameter `A` must be explicitly specified","code":{"code":"E0393","explanation":"\nA type parameter which references `Self` in its default value was not specified.\nExample of erroneous code:\n\n```compile_fail,E0393\ntrait A<T=Self> {}\n\nfn together_we_will_rule_the_galaxy(son: &A) {}\n// error: the type parameter `T` must be explicitly specified in an\n//        object type because its default value `Self` references the\n//        type `Self`\n```\n\nA trait object is defined over a single, fully-defined trait. With a regular\ndefault parameter, this parameter can just be substituted in. However, if the\ndefault parameter is `Self`, the trait changes for each concrete type; i.e.\n`i32` will be expected to implement `A<i32>`, `bool` will be expected to\nimplement `A<bool>`, etc... These types will not share an implementation of a\nfully-definull,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0393, E0599.\n"}
[00:49:07] {"message":"For more information about an error, try `rustc --explain E0393`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0393`.\n"}
[00:49:07] ------------------------------------------
[00:49:07] 
[00:49:07] thread '[ui] ui/unspecified-self-in-trait-ref.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3284:9
[00:49:07] 
---
[00:49:07] 
[00:49:07] 
[00:49:07] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:49:07] Build completed unsuccessfully in 0:03:58
[00:49:07] Makefile:58: recipe for target 'check' failed
[00:49:07] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00448f5f
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri Dec  7 03:31:09 UTC 2018
---
travis_fold:end:after_failure.1
travis_fold:start:after_failure.2
travis_time:start:08f1d906
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:1b054897
$ dmesg | grep -i kill

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

@rust-highfive

This comment has been minimized.

@alexreg
Copy link
Contributor Author

alexreg commented Dec 7, 2018

@TimNN Why does @rust-highfive no longer hide CI log comments for out-of-date commits?

@bors
Copy link
Contributor

bors commented Dec 7, 2018

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

@Centril
Copy link
Contributor

Centril commented Dec 7, 2018

@bors r+ p=1

Let's get this done quickly so we avoid rebasing over and over again.

@bors
Copy link
Contributor

bors commented Dec 7, 2018

📌 Commit 99fd42ff5dbd983dda8879578fe442ddeb9bac86 has been approved by Centril

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 7, 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.
travis_time:end:0645fb2c:start=1544225124740862255,finish=1544225127469504875,duration=2728642620
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
[00:05:17]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:06:35]    Compiling syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
[00:12:09]    Compiling rustc_mir v0.0.0 (/checkout/src/librustc_mir)
[00:12:09]    Compiling rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
[00:12:09] error: missing `fn`, `type`, or `const` for impl-item declaration
[00:12:09]    --> src/librustc_typeck/check/method/suggest.rs:733:10
[00:12:09] 733 |           }
[00:12:09]     |  __________^
[00:12:09]     |  __________^
[00:12:09] 734 | |         tcx.hir().krate().visit_all_item_likes(&mut Visitor {
[00:12:09]     | |________^ missing `fn`, `type`, or `const`
[00:12:09] 
[00:12:09] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `)`
[00:12:09]    --> src/librustc_typeck/check/method/suggest.rs:737:10
[00:12:09] 737 |         });
[00:12:09]     |          ^ expected one of 11 possible tokens here
[00:12:09] 
[00:12:09] 
[00:12:09] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `let`
[00:12:09]    --> src/librustc_typeck/check/method/suggest.rs:740:9
[00:12:09] 737 |         });
[00:12:09] 737 |         });
[00:12:09]     |            - expected one of 11 possible tokens here
[00:12:09] ...
[00:12:09] 740 |         let mut external_mods = FxHashSet::default();
[00:12:09]     |         ^^^ unexpected token
[00:12:09] 
[00:12:09] error: expected pattern, found keyword `for`
[00:12:09]    --> src/librustc_typeck/check/method/suggest.rs:750:17
[00:12:09]     |
[00:12:09] 750 |                 for child in tcx.item_children(def_id).iter() {
[00:12:09] 
[00:12:09] error: expected expression, found reserved identifier `_`
[00:12:09]    --> src/librustc_typeck/check/method/suggest.rs:754:13
[00:12:09]     |
[00:12:09]     |
[00:12:09] 754 |             _ => {}
[00:12:09]     |             ^ expected expression
[00:12:09] 
[00:12:10] error[E0407]: method `handle_external_def` is not a member of trait `itemlikevisit::ItemLikeVisitor`
[00:12:10]    --> src/librustc_typeck/check/method/suggest.rs:741:9
[00:12:10] 741 | /         fn handle_external_def(tcx: TyCtxt,
[00:12:10] 742 | |                                traits: &mut Vec<DefId>,
[00:12:10] 742 | |                                traits: &mut Vec<DefId>,
[00:12:10] 743 | |                                external_mods: &mut FxHashSet<DefId>,
[00:12:10] 744 | |                                def: Def) {
[00:12:10] 754 | |             _ => {}
[00:12:10] 755 | |         }
[00:12:10] 755 | |         }
[00:12:10]     | |_________^ not a member of trait `itemlikevisit::ItemLikeVisitor`
[00:12:10] 
[00:12:10] error[E0425]: cannot find function `handle_external_def` in this scope
[00:12:10]    --> src/librustc_typeck/check/method/suggest.rs:762:9
[00:12:10]     |
[00:12:10] 762 |         handle_external_def(tcx, &mut traits, &mut external_mods, Def::Mod(def_id));
[00:12:10] 
[00:12:10] error[E0425]: cannot find value `external_mods` in this scope
[00:12:10]    --> src/librustc_typeck/check/method/suggest.rs:762:52
[00:12:10]     |
[00:12:10]     |
[00:12:10] 762 |         handle_external_def(tcx, &mut traits, &mut external_mods, Def::Mod(def_id));
[00:12:10] 
[00:12:10] 
[00:12:11] error[E0046]: not all trait items implemented, missing: `visit_trait_item`, `visit_impl_item`
[00:12:11]    --> src/librustc_typeck/check/method/suggest.rs:727:5
[00:12:11]     |
[00:12:11] 727 |     impl<'v, 'a, 'tcx> itemlikevisit::ItemLikeVisitor<'v> for Visitor<'a, 'tcx> {
[00:12:11]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `visit_trait_item`, `visit_impl_item` in implementation
[00:12:11]     |
[00:12:11]     = note: `visit_trait_item` from trait: `fn(&mut Self, &'hir rustc::hir::TraitItem)`
[00:12:11]     = note: `visit_impl_item` from trait: `fn(&mut Self, &'hir rustc::hir::ImplItem)`
[00:12:11] error: aborting due to 9 previous errors
[00:12:11] 
[00:12:11] Some errors occurred: E0046, E0407, E0425.
[00:12:11] For more information about an error, try `rustc --explain E0046`.
[00:12:11] For more information about an error, try `rustc --explain E0046`.
[00:12:11] error: Could not compile `rustc_typeck`.
[00:12:11] warning: build failed, waiting for other jobs to finish...
[00:15:06] error: build failed
[00:15:06] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:15:06] expected success, got: exit code: 101
[00:15:06] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:15:06] Build completed unsuccessfully in 0:11:49
[00:15:06] Makefile:28: recipe for target 'all' failed
[00:15:06] make: *** [all] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0451cf4e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri Dec  7 23:40:43 UTC 2018

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

@Centril
Copy link
Contributor

Centril commented Dec 7, 2018

@bors delegate+

@bors
Copy link
Contributor

bors commented Dec 7, 2018

✌️ @alexreg can now approve this pull request

@alexreg
Copy link
Contributor Author

alexreg commented Dec 8, 2018

Aghh, nll stderr files...

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Dec 8, 2018

📌 Commit 003c5b7 has been approved by alexreg

@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 Dec 8, 2018
@bors
Copy link
Contributor

bors commented Dec 8, 2018

⌛ Testing commit 003c5b7 with merge 059e6a6...

bors added a commit that referenced this pull request Dec 8, 2018
Various minor/cosmetic improvements to code

r? @Centril 😄
@bors
Copy link
Contributor

bors commented Dec 8, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexreg
Pushing 059e6a6 to master...

@scalexm
Copy link
Member

scalexm commented Dec 8, 2018

I'm not sure I understand the added value of this PR, apart from forcing everyone to rebase, and I could not find any discussion about it prior to it being merged.

I agree one should always feel free to fix typos or spelling / grammatical errors, but I'm not sure we should somehow "impose" a writing style or whatever.

For example, I like to write the comma before the Latin locution "i.e." because I believe this is correct English and moreover it mimics the usage in my own language, but I don't care if someone else likes another usage. The same goes for abbreviating the Latin locution "nota bene". Everyone has their writing style :)

I think this PR will be stale in a few weeks because people will probably stick to their own writing style. So what will be the next steps? Are we opening a PR once a month to fix people comments? Or will we impose PR authors to fix their comments before any PR can be merged?

@alexreg
Copy link
Contributor Author

alexreg commented Dec 8, 2018

@scalexm I personally would like to see a writing style agreed upon. I adopted a comma after Latin abbreviations because it is the U.S. English convention, and such conventions are used everywhere else. (Note, I'm actually British.) I also consider it more logical, because "e.g." and "i.e." are essentially abbreviated Latin translations of the phrases "for example" and "that is". It is necessary in grammatically-correct English to include the comma:

  • For example, this is a sentence.
  • That is, the comma is required.
  • Note, one cannot dispense with the comma.

You make a fair point about the codebase diverging in style, however, which is why I feel a consensus on writing style, punctuation, and whatnot would be great at this point. Reviewers could then uphold it.

P.S. There's no requirement for any formal process on a PR like this, so I'm pretty sure no rules were broken. I dispute that it doesn't add value, though like I said above, it adds more value if people then stick to certain writing guidelines, and they're furthermore enforced.

@scalexm
Copy link
Member

scalexm commented Dec 9, 2018

@alexreg That’s very fine but since it is a personal opinion, I’d like to see it discussed somewhere before imposing anything to the codebase, on the internals for example.

@alexreg
Copy link
Contributor Author

alexreg commented Dec 9, 2018

I don't think there's any requirement to discuss it, as long as someone approves the PR... deciding on style guidelines is another matter. Do you want to create a thread for that, or should I?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants