Skip to content

Fix #53525 - Unify E0243, E0244, E0087, E0088, E0089, and E0090 into E0107 #53584

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

Merged
merged 3 commits into from
Aug 25, 2018

Conversation

matthew-russo
Copy link
Contributor

@matthew-russo matthew-russo commented Aug 22, 2018

Fix #53525

This pr merges all errors related to too many or too few generic arguments in types and functions. E0243, E0244, E0087, E0088, E0089, E0090 errors will no longer be emitted and E0107 will be used instead.

@rust-highfive
Copy link
Contributor

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

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

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 22, 2018
@matthew-russo
Copy link
Contributor Author

r? @varkor

@rust-highfive rust-highfive assigned varkor and unassigned pnkfelix Aug 22, 2018
@matthew-russo
Copy link
Contributor Author

referencing #53525, consolidating error codes E0087, E0088, E0089, E0090, E0243, and E0244 into E0107. Let me know if there are any changes I should make

@rust-highfive
Copy link
Contributor

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.
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:45:06] 
[00:45:06] running 4146 tests
[00:45:09] ....................................................................................................
[00:45:12] .........................................................F..........................................
[00:45:17] ....................................................................................................
[00:45:20] ....................................................................................................
[00:45:24] .............i......................................................................................
[00:45:28] F..................................................................................................i
[00:45:28] F..................................................................................................i
[00:45:31] .......i............................................................................................
[00:45:34] .............ii.iii.................................................................................
[00:45:37] ....................................................................................................
[00:45:39] ....................................................................................................
[00:45:41] ....................................................................................................
[00:45:44] ....................................................................................................
[00:45:46] .............................................................................................i......
[00:45:49] .......................F.FF.F.F..............................i......................................
[00:45:52] ....................................................................................................
[00:45:55] ..............................F.................................................................F...
[00:46:00] ..................................................................................................F.
[00:46:04] ....................................................................................................
[00:46:04] ....................................................................................................
[00:46:06] .....................................................................F..............................
[00:46:12] ....................................................................................................
[00:46:16] ....................................................................................................
[00:46:18] ....................................................................................................
[00:46:22] ....................................................................................................
[00:46:22] ....................................................................................................
[00:46:25] ................................i...................................................................
[00:46:28] ........................F.........................................................i.i..ii...........
[00:46:34] ..............................................................................i.....................
[00:46:37] ....................................................................................................
[00:46:40] ....................................................................................................
[00:46:43] ....................................................................................................
[00:46:43] ....................................................................................................
[00:46:46] ....................................................................................................
[00:46:49] .........i..........................................................................................
[00:46:52] ...F................................................................................................
[00:46:55] ....................................................................................................
[00:46:59] ............F...........................F.i....................................................F....
[00:47:02] .....F...........................................................................F.............F.F..
[00:47:05] F.................FFF...............................................................................
s/auxiliary" "-A" "unused"
[00:47:09] stdout:
[00:47:09] ------------------------------------------
[00:47:09] 
[00:47:09] 
[00:47:09] ------------------------------------------
[00:47:09] stderr:
[00:47:09] ------------------------------------------
[00:47:09] {"message":"wrong number of type arguments: expected 1, found 2","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //       nd 3
[00:47:09] 21    |
[00:47:09] 21    |
[00:47:09] 22 LL |     E::V::<'static, 'static, 'static>(&0);
[00:47:09] 24 
[00:47:09] 25 error: aborting due to 4 previous errors
[00:47:09] 26 
[00:47:09] - Some errors occurred: E0088, E0090.
[00:47:09] - Some errors occurred: E0088, E0090.
[00:47:09] - For more information about an error, try `rustc --explain E0088`.
[00:47:09] + For more information about this error, try `rustc --explain E0107`.
[00:47:09] 29 
[00:47:09] 
[00:47:09] 
[00:47:09] The actual stderr differed from the expected stderr.
[00:47:09] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/constructor-lifetime-args/constructor-lifetime-args.stderr
[00:47:09] To update references, rerun the tests and pass the `--bless` flag
[00:47:09] To only update this specific test, also pass `--test-args constructor-lifetime-args.rs`
[00:47:09] error: 1 errors occurred comparing output.
[00:47:09] status: exit code: 1
[00:47:09] status: exit code: 1
[00:47:09] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/constructor-lifetime-args.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/constructor-lifetime-args/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/constructor-lifetime-args/auxiliary" "-A" "unused"
[00:47:09] ------------------------------------------
[00:47:09] 
[00:47:09] 
[00:47:09] --------   let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/constructor-lifetime-args.rs","byte_start":1198,"byte_end":1205,"line_start":29,"line_end":29,"column_start":27,"column_end":34,"is_primary":true,"text":[{"text":"    S::<'static, 'static, 'static>(&0, &0);","highlight_start":27,"highlight_end":34}],"label":"unexpected lifetime argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expected 2, found 3\n  --> /checkout/src/test/ui/constructor-lifetime-args.rs:29:27\n   |\nLL |     S::<'static, 'static, 'static>(&0, &0);\n   |                           ^^^^^^^ unexpected lifetime argument\n\n"}
[00:47:09] {"message":"wrong number of lifetime arguments: expected 2, found 1","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n                    //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/constructor-lifetime-args.rs","byte_start":1432,"byte_end":1439,"line_start":34,"line_end":34,"column_start":30,"column_end":37,"is_primary":true,"text":[{"text":"    E::V::<'static, 'static, 'static>(&0);","highlight_start":30,"highlight_end":37}],"label":"unexpected lifetime argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expected 2, found 3\n  --> /checkout/src/test/ui/constructor-lifetime-args.rs:34:30\n   |\nLL |     E::V::<'static, 'static, 'static>(&0);\n   |                              ^^^^^^^ unexpected lifetime argument\n\n"}
[00:47:09] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:47:09] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:47:09] ------------------------------------------
[00:47:09] 
[00:47:09] thread '[ui] ui/constructor-lifetime-args.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3189:9
[00:47:09] 
[00:47:09] 
[00:47:09] ---- [ui] ui/generic/generic-arg-mismatch-recover.rs stdout ----
[00:47:09] diff of stderr:
[00:47:09] 
[00:4 C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/generic/generic-arg-mismatch-recover.rs","byte_start":554,"byte_end":561,"line_start":16,"line_end":16,"column_start":20,"column_end":27,"is_primary":true,"text":[{"text":"    Foo::<'static, 'static, ()>(&0); //~ ERROR wrong number of lifetime arguments","highlight_start":20,"highlight_end":27}],"label":"unexption":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/generic/generic-impl-more-params-with-defaults.rs","byte_start":653,"byte_end":682,"line_start":23,"line_end":23,"column_start":5,"c--------
[00:47:09] {"message":"wrong number of type arguments: expected at least 2, found 1","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/generinumber of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/generic/generic-type-more-params-with-defaults.rs","byte_start":581,"byte_end":603,"line_start":19,"line_end":19,"column_start":12,"column_end":34,"is_primary":true,"text":[{"text":"    let _: Vec<isize, Heap, bool>;","highlight_start":12,"highlight_end":34}],"label":"expected at most 2 type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected at most 2, found 3\n  --> /checkout/src/test/ui/generic/generic-type-more-params-with-defaults.rs:19:12\n   |\nLL |     let _: Vec<isize, Heap, bool>;\n   |            ^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type argument\n\n"}
[00:47:09] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:47:09] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:47:09] ------------------------------------------
[00:47:09] 
[00:47:09] thread '[ui] ui/generic/generic-type-more-params-with-defaults.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3189:9
[00:47:09] 
[00:47:09] 
[00:47:09] ---- [ui] ui/issue-53251.rs stdout ----
[00:47:09] diff of stderr:
[00:47:09] 
[00:47:09] - error[E0087]: wrong number of type arguments: expected 0, fime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-14092.rs","byte_start":477,"byte_end":480,"line_start":11,"line_end":11,"column_start":11,"column_end":14,"is_primary":true,"text":[{"text":"fn fn1(0: Box) {}","highlight_start":11,"highlight_end":14}],"label":"expected 1 type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 1, found 0\n  --> /checkout/src/test/ui/issues/issue-14092.rs:11:11\n   |\nLL | fn fn1(0:e features. In order to do so, please switch to a nightly version of\nrustc (by using rustup).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-23024.rs","byte_start":653,"byte_end":655,"line_start":19,"line_end":19,"column_start":35,"column_end":37,"is_primary":true,"text":[{"text":"    println!(\"{:?}\",(vfnfer[0] as Fn)(3));","highlight_start":35,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"add #![feature(unboxed_closures)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625)\n  --> /checkout/src/test/ui/issues/issue-23024.rs:19:35\n   |\nLL |     println!(\"{:?}\",(vfnfer[0] as Fn)(3));\n   |                                   ^^\n   |\n   = help: add #![feature(unboxed_closures)] to the crate attributes to enable\n\n"}
[00:47:09] {"message":"wrong number of type arguments: expected 1, found 0","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime argum"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-3214.rs","byte_start":600,"byte_end":601,"line_start":16,"line_end":16,"column_start":26,"column_end":213,"column_end":15,"is_primary":true,"text":[{"text":"    fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {}","highlight_start":13,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:41:15\n   |\nLL |     S::late::<'static, 'static, 'static>(S, &0, &0);\n   |               ^^^^^^^\n   |\nnote: the late bound lifetime parameter is introduced here\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:14:13\n   |\nLL |     fn late<'a, 'b>(self, _: &'a u8, _: &'b u8) {}\n   |             ^^\n\n"}
[00:47:09] {"message":"cannot specify lifetime arguments explicitly if late bound lifetime parameters are present","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":1734,"byte_end":1741,"line_start":44,"line_end":44,"column_start":21,"column_end":28,"is_primary":true,"text":[{"text":"    S::late_early::<'static, 'static>(S, &0);","highlight_start":21,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the late bound lifetime parameter is introduced here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":661,"byte_end":663,"line_start":17,"line_end":17,"column_start":19,"column_end":21,"is_primary":true,"text":[{"texplicit(self, _: &u8, _: &u8) {}","highlight_start":31,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:50:24\n   |\nLL |     S::late_implicit::<'static>(S, &0, &0);\n   |                        ^^^^^^^\n   |\nnote: the late bound lifetime parameter is introduced here\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:15:31\n   |\nLL |     fn late_implicit(self, _: &u8, _: &u8) {}\n   |                               ^\n\n"}
[00:47:09] {"message":"cannot specify lifetime arguments explicitly if late bound lifetime parameters are present","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":2102,"byte_end":2109,"line_start":52,"line_end":52,"column_start":24,"column_end":31,"is_primary":true,"text":[{"text":"    S::late_implicit::<'static, 'static>(S, &0, &0);","highlight_start":24,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the late bound lifetime parameter is introduced here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":568,"byte_end":568,"line_start":15,"line_end":15,"column_start":31,"column_end":31,"is_primary":true,"text":[{"text":"    fn late_implicit(self, _: &u8, _: &u8) {}","hi":20,"line_end":20,"column_start":26,"column_end":28,"is_primary":true,"text":[{"text":"    fn late_unused_early<'a, 'b>(self) -> &'b u8 { loop {} }","highlight_start":26,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:67:28\n   |\nLL |     S::late_unused_early::<'static, 'static>(S);\n   |                            ^^^^^^^\n   |\nnote: the late bound lifetime parameter is introduced here\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:20:26\n   |\nLL |     fn late_unused_early<'a, 'b>(self) -> &'b u8 { loop {} }\n   |                          ^^\n\n"}
[00:47:09] {"message":"cannot specify lifetime arguments explicitly if late bound lifetime parameters are present","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":3051,"byte_end":3058,"line_start":69,"line_end":69,"column_start":28,"column_end":35,"is_primary":true,"text":[{"text":"    S::late_unused_early::<'static, 'static, 'static>(S);","highlight_start":28,"highlight_end":35}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the late bound lifetime parameter is introduced here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":865,"byte_end":867,"line_s~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":992,"byte_end":993,"line_start":39,"line_end":39,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        y: 4,","highlight_start":12,"highlight_end":13}],"label":"expected f32, found integral variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `f32`\n   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"use a float literal","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":992,"byte_end":993,"line_start":39,"line_end":39,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        y: 4,","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"4.0","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs:39:12\n   |\nLL |         y: 4,\n   |            ^\n   |            |\n   |            expected f32, found integral variable\n   |            help: use a float literal: `4.0`\n   |\n   = note: expected type `f32`\n              found type `{integer}`\n\n"}
[00:47:09] {"message":"mismatched types","code":{"code":"pected type `Point<{integer}>`\n              found type `Point<f32>`\n\n"}
[00:47:09] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":1750,"byte_end":1763,"line_start":69,"line_end":69,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"        PointF { .. } => {} //~ ERROR mismatched types","highlight_start":9,"highlight_end":22}],"label":"expected integral variable, found f32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `Point<{integer}>`\n   found type `Point<f32>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs:69:9\n   |\nLL |         PointF { .. } => {} //~ ERROR mismatched types\n   |         ^^^^^^^^^^^^^ expected integral variable, found f32\n   |\n   = note: expeerr.
[00:47:09] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/tag-type-args/tag-type-args.stderr
[00:47:09] To update references, rerun the tests and pass the `--bless` flag
[00:47:09] To only update this specific test, also pass `--test-args tag-type-args.rs`
[00:47:09] error: 1 errors occurred comparing output.
[00:47:09] status: exit code: 1
[00:47:09] status: exit code: 1
[00:47:09] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/tag-type-args.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/tag-type-args/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/tag-type-args/auxiliary" "-A" "unused"
[00:47:09] ------------------------------------------
[00:47:09] 
[00:47:09] ------------------------------------------
[00:47:09] stderr:
[00:47:09] stderr:
[00:47:09] ------------------------------------------
[00:47:09] {"message":"wrong number of type arguments: expected 1, found 0","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expectch it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-test-2.rs","byte_start":904,"byte_end":907,"line_start":20,"line_end":20,"column_start":26,"column_end":29,"is_primary":true,"text":[{"text":"    (box 10 as Box<bar>).dup();","highlight_start":26,"highlight_end":29}],"label":"the trait `bar` is not implemented for `dyn bar`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0277]: the trait bound `dyn bar: bar` is not satisfied\n  --> /checkout/src/test/ui/traits/trait-test-2.rs:20:26\n   |\nLL |     (box 10 as Box<bar>).dup();\n   |                          ^^^ the trait `bar` is not implemented for `dyn bar`\n\n"}
[00:47:09] {"message":"the trait `bar` 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 is 'unsized'. In such cases the boxed\npointer is a 'fat pointer' that contains an extra pointer to a table of methods\n(among other things) for dynamic dispatch. This design mandates some\nrestrictions on the types of traits that are allowed to be used in trait\nobjects, which are collectively termed as 'object safety' rules.\n\nAttempting to create a trait object for a non object-safe trait will trigger\nths called with unparametrized substitutions\n(i.e., substitutions where none of the substituted types are themselves\nparametrized).\n\nHowever, with trait objects we have to make a table containing _every_ object\nthat implements the trait. Now, if it has type parameters, we need to add\nimplementations for every type that implements the trait, and there could\ntheoretically be an infinite number of types.\n\nFor example, with:\n\n```\ntrait Trait {\n    fn foo<T>(&self, on: T);\n    // more methods\n}\n\nimpl Trait for String {\n    fn foo<T>(&self, on: T) {\n        // implementation 1\n    }\n}\n\nimpl Trait for u8 {\n    fn foo<T>(&self, on: T) {\n        // implementation 2\n    }\n}\n\n// 8 more implementations\n```\n\nNow, if we have the following code:\n\n```compile_fail,E0038\n# trait Trait { fn foo<T>(&self, on: T); }\n# impl Trait for String { fn foo<T>(&self, on: T) {} }\n# impl Trait for u8 { fn foo<T>(&self, on: T) {} }\n# impl Trait for bool { fn foo<T>(&self, on: T) {} }\n# // etc.\nfn call_foo(thing: Box<Trait>) {\n    thing.foo(true); // this could be any one of the 8 types above\n    thing.foo(1);\n    thing.foo(\"hello\");\n}\n```\n\nWe don't just need to create a table of all implementations of all methods 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 calthat 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()` r: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs","byte_start":800,"byte_end":802,"line_start":20,"line_end":20,"column_start":30,"column_end":32,"is_primary":true,"text":[{"text":"struct MyStruct2<'a, T: Copy<'a>>;","highlight_start":30,"highlight_end":32}],"label":"unexpected lifetime argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expecrendered":"error: aborting due to previous error\n\n"}
[00:47:09] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:47:09] ------------------------------------------
[00:47:09] 
[00:47:09] thread '[ui] ui/typeck/typeck_type_placeholder_lifetime_1.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3189:9
[00:47:09] 
[00:47:09] 
[00:47:09] ---- [ui] ui/typeck/typeck_type_placeholder_lifetime_2.rs stdout ----
[00:47:09] diff of stderr:
[00:47:09] 
[00:47:09] - error[E0244]: wrong number of type arguments: expected 1, found 2
[00:47:09] + error[E0107]: wrong number of type arguments: expected 1, found 2
[00:47:09] 2   --> $DIR/typeck_type_placeholder_lifetime_2.rs:19:19
[00:47:09] 3    |
[00:47:09] 4 LL |     let c: Foo<_, usize> = Foo { r: &5 };
[00:47:09] 6 
[00:47:09] 7 error: aborting due to previous error
[00:47:09] 8 
[00:47:09] - For more information about this error, try `rustc --explain E0244`.
[00:47:09] - For more information about this error, try `rustc --explain E0244`.
[00:47:09] + For more information about this error, try `rustc --explain E0107`.
[00:47:09] 10 
[00:47:09] 
[00:47:09] 
[00:47:09] The actual stderr differed from the expected stderr.
[00:47:09] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/typeck/typeck_type_placeholder_lifetime_2/typeck_type_placeholder_lifetime_2.stderr
[00:47:09] To update references, rerun the tests and pass the `--bless` flag
[00:47:09] To only update this specific test, also pass `--test-args typeck/typeck_typull,"expansion":null}],"children":[],"rendered":"error[E0220]: associated type `Output` not found for `Zero`\n  --> /checkout/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:15:15\n   |\nLL | fn foo(_: Zero())\n   |               ^^ associated type `Output` not found\n\n"}
[00:47:09] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:47:09] {"message":"Some errors occurred: E0107, E0220.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0107, E0220.\n"}
[00:47:09] {"message":"For more information about an error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0107`.\n"}
[00:47:09] ------------------------------------------
[00:47:09] 
[00:47:09] thread '[ui] ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3189:9
[00:47:09] 
[00:47:09] 
[00:47:09] ---- [ui] ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs stdout ----
[00:47:09] diff of stderr:
[00:47:09] 
[00:47:09] - error[E0243]: wrong number of type arguments: expected 3, found 1
[00:47:09] + error[E0107]: wrong number of type arguments: expected 3, found 1
[00:47:09] 2   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:15:12
[00:47:09] 3    |
[00:47:09] 4 LL | fn foo(_: &Three())
[00:47:09] 12 
[00:47:09] 12 
[00:47:09] 13 //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs","byte_start":561,"byte_end":568,"line_start":15,"line_end":15,"column_start":12,"column_end":19,"is_primary":true,"text":[{"text":"fn foo(_: &Three())","highlight_start":12,"highlight_end":19}],"label":"expected 3 type arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 3, found 1\n  --> /checkout/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:15:12\n   |\nLL | fn foo(_: &Three())\n   |            ^^^^^^^ expected 3 type arguments\n\n"}
[00:47:09] {"message":"associated type `Output` not found for `Three<(), [type error], [type error]>`","code":{"code":"E0220","explanation":"\nYou used an associated type which isn't defined in the trait.\nErroneous code example:\n\n```compile_fail,E0220\ntrait T1 {\n    type Bar;\n}\n\ntype Foo = T1<F=i32>; // error: associated type `F` not found for `T1`\n\n// or:\n\ntrait T2 {\n    type Bar;\n\n    // error: Baz is used but not declared\n    fn return_bool(&self, _: &Self::Bar, _: &Self::Baz) -> bool;\n}\n```\n\nMake sure that you have defined the associated type in the trait body.\nAlso, verify that you used the right trait or you didn't misspell the\nassociated type name. Example:\n\n```\ntrait T1 {\n    type Bar;\n}\n\1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs","byte_start":526,"byte_end":542,"line_start":15,"line_end":15,"column_start":13,"column_end":29,"is_primary":true,"text":[{"text":"fn f<F:Trait(isize) -> isize>(x: F) {}","highlight_start":13,"highlight_end":29}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 0, found 1\n  --> /checkout/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs:15:13\n   |\nLL | fn f<F:Trait(isize) -> isize>(x: F) {}\n   |             ^^^^^^^^^^^^^^^^ unexpected type argument\n\n"}
[00:47:09] {"message":"associated type `Output` not found for `Trait`","code":{"code":"E0220","explanation":"\nYou used an associated type which isn't defined in the trait.\nErroneous code example:\n\n```compile_fau/stage0-bootstrap-tools/x86_64-unknown-linux-gnu
126196 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu
126192 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release
123428 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps
121652 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps

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)

Copy link
Member

@varkor varkor left a comment

Choose a reason for hiding this comment

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

This is looking good so far! It looks like there are still some tests failing, which you'll need to update. Also, it's not linking the committer for each commit with your GitHub profile, which you might want to fix with a rebase.

@@ -1041,6 +1041,7 @@ enum NightsWatch {}
"##,

E0087: r##"
#### Note: this error code is no longer emitted by the compiler.

This comment was marked as resolved.

@@ -1258,18 +1262,53 @@ extern "rust-intrinsic" {
"##,

E0107: r##"
This error means that an incorrect number of lifetime parameters were provided
for a type (like a struct or enum) or trait:
This error means that an incorrect number of type or lifetime parameters
Copy link
Member

Choose a reason for hiding this comment

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

Since we're going to be getting const parameters fairly soon, it's easier just to call them "generic arguments" rather than "type or lifetime parameters".


struct Bar { x: Foo } // error: wrong number of type arguments:
// expected 1, found 0
struct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:
Copy link
Member

Choose a reason for hiding this comment

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

*arguments

}
```

```compile_fail,E0088
Copy link
Member

Choose a reason for hiding this comment

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

Should be E0107.

}
```

```compile_fail,E0107
Copy link
Member

Choose a reason for hiding this comment

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

These examples can be in the same code block. You don't need an example of less than/greater than the expected number for every single position — maybe one example for each position (type, function call, method call).

@varkor
Copy link
Member

varkor commented Aug 22, 2018

If you put the pull request description in the first comment (and title), it helps people to tell what the pull request is doing, at a glance, too. I think you'll need to put "Fix #53525" in the first comment for GitHub to automatically close the issue when this is merged.

@matthew-russo matthew-russo changed the title Fix #53525 Fix #53525 - Unify E0243, E0244, E0087, E0088, E0089, and E0090 into E0107 Aug 22, 2018
@matthew-russo
Copy link
Contributor Author

Noted. Will probably not get a chance to update this before this evening

@varkor
Copy link
Member

varkor commented Aug 22, 2018

If you could also rebase so that the relevant changes were together, that would make for a cleaner history — maybe a commit for:

  • Merging error code descriptions into E0107 and adding "no longer emitted" messages to the others.
  • Removing GenericArgMismatchErrorCode.
  • Updating all UI tests with the updated diagnostics.

Thanks!

@matthew-russo
Copy link
Contributor Author

@varkor I rebased and changed order of code. Honestly not positive if I got it right since was my first time reordering git commits. Also still haven't fixed all failing errors so will do that tomorrow and will need to rebase again. Will update when its ready to review

@rust-highfive
Copy link
Contributor

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.
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:44:51] 
[00:44:51] running 4160 tests
[00:44:54] ....................................................................................................
[00:44:57] .........................................................F..........................................
[00:45:02] ....................................................................................................
[00:45:05] ....................................................................................................
[00:45:09] ..............i.....................................................................................
[00:45:09] ..............i.....................................................................................
[00:45:13] ..F.................................................................................................
[00:45:19] ..................ii.iii............................................................................
[00:45:19] ..................ii.iii............................................................................
[00:45:22] ......................................................................FFFF..........................
[00:45:24] ......................FF............................................................................
[00:45:29] ....................................................................................................
[00:45:31] ....................................................................................................
[00:45:31] ....................................................................................................
[00:45:34] ......i.............................FF.F..FF..............................i.........................
[00:45:37] ....................................................................................................
[00:45:40] ............................................F.......................................................
[00:45:42] ............F........................................i..............................................
[00:45:45] ....................................................................................................
[00:45:48] ...........F........................................................................................
[00:45:51] ...................................................................................F................
[00:45:57] ....................................................................................................
[00:46:00] ....................................................................................................
[00:46:03] ....................................................................................................
[00:46:07] ....................................................................................................
[00:46:07] ....................................................................................................
[00:46:09] ..............................................i.....................................................
[00:46:12] ......................................F.........................................................i.i.
[00:46:15] .ii.................................................................................................
[00:46:22] ....................................................................................................
[00:46:25] ....................................................................................................
[00:46:27] ....................................................................................................
[00:46:30] ....................................................................................................
[00:46:30] ....................................................................................................
[00:46:34] .......................i............................................................................
[00:46:37] .................F..................................................................................
[00:46:39] ....................................................................................................
[00:46:43] ..........................F...........................F.i...........................................
[00:46:47] ..........F........F...........................................................................F....
[00:46:49] .........F.F.F..................FF.F................................................................
46:53] 
[00:46:53] 17    |                                    ^^^ unexpected type argument
[00:46:53] 18 
[00:46:53] - error[E0088]: wrong number of lifetime arguments: expected 0, found 1
[00:46:53] - error[E0088]: wrong number of lifetime arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of lifetime arguments: expected 0, found 1
[00:46:53] 20   --> $DIR/bad-mid-path-type-params.rs:49:25
[00:46:53] 21    |
[00:46:53] 22 LL |     let _: S2 = Trait::<'a,isize>::new::<f64>(1, 1.0);
[00:46:53] 24 
[00:46:53] 25 error: aborting due to 4 previous errors
[00:46:53] 26 
[00:46:53] - Some errors occurred: E0087, E0088, E0107.
[00:46:53] - Some errors occurred: E0087, E0088, E0107.
[00:46:53] - For more information about an error, try `rustc --explain E0087`.
[00:46:53] + For more information about this error, try `rustc --explain E0107`.
[00:46:53] 29 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/bad/bad-mid-path-type-params/bad-mid-path-type-params.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args bad/bad-mid-path-type-params.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/bad/bad-mid-path-type-params.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/bad/bad-mid-path-type-params/a" "-Crpath" "-O" "-Zunstable-options"oo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/bad/bad-mid-path-type-params.rs","byte_start":940,"byte_end":942,"line_start":43,"line_end":43,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":"    let _ = S::<'a,isize>::new::<f64>(1, 1.0);","highlight_start":17,"highlight_end":19}],"label":"unexpected lifetime argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expected 0, found 1\n  --> /checkout/src/test/ui/bad/bad-mid-path-type-params.rs:43:17\n   |\nLL |     let _ = S::<'a,isize>::new::<f64>(1, 1.0);\n   |                 ^^ unexpected lifetime a 18 
[00:46:53] - error[E0088]: wrong number of lifetime arguments: expected 2, found 3
[00:46:53] + error[E0107]: wrong number of lifetime arguments: expected 2, found 3
[00:46:53] 21    |
[00:46:53] 21    |
[00:46:53] 22 LL |     E::V::<'static, 'static, 'static>(&0);
[00:46:53] 24 
[00:46:53] 25 error: aborting due to 4 previous errors
[00:46:53] 26 
[00:46:53] - Some errors occurred: E0088, E0090.
[00:46:53] - Some errors occurred: E0088, E0090.
[00:46:53] - For more information about an error, try `rustc --explain E0088`.
[00:46:53] + For more information about this error, try `rustc --explain E0107`.
[00:46:53] 29 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/constructor-lifetime-args/constructor-lifetime-args.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args constructor-lifetime-args.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/constructor-lifetime-args.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/constructor-lifetime-args/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-gnus:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/constructor-lifetime-args.rs","byte_start":1079,"byte_end":1091,"line_start":27,"line_end":27,"column_start":5,"column_end":17,"is_primary":true,"text":[{"text":"    S::<'static>(&0, &0);","highlight_start":5,"highlight_end":17}],"label":"expected 2 lifetime arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expected 2, found 1\n  --> /checkout/src/test/ui/constructor-lifetime-args.rs:27:5\n   |\nLL |     S::<'static>(&0, &0);\n   |     ^^^^^^^^^^^^ expected 2 lifetime arguments\n\n"}
[00:46:53] {"message":"wrong number of lifetime arguments: expected 2, found 3","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error:/        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/constructor-lifetime-args.rs","byte_start":1432,"byte_end":1439,"line_start":34,"line_end":34,"column_start":30,"column_end":37,"is_primary":true,"text":[{"text":"    E::V::<'static, 'static, 'static>(&0);","highlight_start":30,"highlight_end":37}],"label":"unexpected lifetime argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expected 2, found 3\n  --> /checkout/src/test/ui/constructor-lifetime-args.rs:34:30\n   |\nLL |     E::V::<'static, 'static, 'static>(&0);\n   |                              ^^^^^^^ unexpected lifetime argument\n\n"}
[00:46:53] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/constructor-lifetime-args.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/error-codes/E0088.rs stdout ----
[00:46:53] normalized stderr:
[00:46:53] error[E0107]: wrong number of lifetime arguments: expected 0, found 1
[00:46:53]   --> $DIR/E0088.rs:15:9
[00:46:53]    |
[00:46:53] LL |     f::<'static>(); //~ ERROR E0107
[00:46:53]    |         ^^^^^^^ unexpected lifetime argument
[00:46:53] error[E0107]: wrong number of lifetime arguments: expected 1, found 2
[00:46:53]   --> $DIR/E0088.rs:16:18
[00:46:53]    |
[00:46:53]    |
[00:46:53] LL |     g::<'static, 'static>(); //~ ERROR E0107
[00:46:53]    |                  ^^^^^^^ unexpected lifetime argument
[00:46:53] error: aborting due to 2 previous errors
[00:46:53] 
[00:46:53] For more information about this error, try `rustc --explain E0107`.
[00:46:53] 
[00:46:53] 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0088/E0088.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args error-codes/E0088.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0088.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/E0088/a" "-Crpath" "-O" "-Zunstableber of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0088.rs","byte_start":576,"byte_end":583,"line_start":16,"line_end":16,"column_start":18,"column_end":25,"is_primary":true,"text":[{"text":"    g::<'static, 'static>(); //~ ERROR E0107","highlight_start":18,"highlight_end":25}],"label":"unexpected lifetime argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expected 1, found 2\n  --> /checkout/src/test/ui/error-codes/E0088.rs:16:18\n   |\nLL |     g::<'static, 'static>(); //~ ERROR E0107\n   |                  ^^^^^^^ unexpected lifetime argument\n\n"}
[00:46:53] {"message":"aborting due to 2 r: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0087.rs","byte_start":517,"byte_end":520,"line_start":15,"line_end":15,"column_start":11,"column_end":14,"is_primary":true,"text":[{"text":"    foo::<f64>(); //~ ERROR wrong number of type arguments: expected 0, found 1 [E0107]","highlight_start":11,"highlight_end":14}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 0, found 1\n  --> /checkout/src/test/ui/error-codes/E0087.rs:15:11\n   |\nLL |     foo::<f64>(); //~ ERROR wrong number of type arguments: expected 0, found 1 [E0107]\n   |           ^^ 2, found 1 [E0107]","highlight_start":5,"highlight_end":15}],"label":"expected 2 type arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 2, found 1\n  --> /checkout/src/test/ui/error-codes/E0089.rs:14:5\n   |\nLL |     foo::<f64>(); //~ ERROR wrong number of type arguments: expected 2, found 1 [E0107]\n   |     ^^^^^^^^^^ expected 2 type arguments\n\n"}
[00:46:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/error-codes/E0089.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/error-codes/E0090.rs stdout ----
[00:46:53] normalized stderr:
[00:46:53] error[E0107]: wrong number of lifetime arguments: expected 2, found 1
[00:46:53]   --> $DIR/E0090.rs:14:5
[00:46:53]    |
[00:46:53] LL |     foo::<'static>(); //~ ERROR wrong number of lifetime arguments: expected 2, found 1 [E0107]
[00:46:53] 
[00:46:53] error: aborting due to previous error
[00:46:53] 
[00:46:53] For more information about this error, try `rustc --explain E0107`.
[00:46:53] For more information about this error, try `rustc --explain E0107`.
[00:46:53]d 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0090.rs","byte_start":512,"byte_end":526,"line_start":14,"line_end":14,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"    foo::<'static>(); //~ ERROR wrong number of lifetime arguments: expected 2, found 1 [E0107]","highlight_start":5,"highlight_end":19}],"label":"expected 2 lifetime arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E010error\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/error-codes/E0243.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/error-codes/E0244.rs stdout ----
[00:46:53] normalized stderr:
[00:46:53] error[E0107]: wrong number of type arguments: expected 0, found 2
[00:46:53]   --> $DIR/E0244.rs:12:23
[00:46:53]    |
[00:46:53] LL | struct Bar<S, T> { x: Foo<S, T> }
[00:46:53]    |                       ^^^^^^^^^ 2 unexpected type arguments
[00:46:53] error: aborting due to previous error
[00:46:53] 
[00:46:53] For more information about this error, try `rustc --explain E0107`.
[00:46:53] 
[00:46:53] 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/error-codes/E0244/E0244.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args error-codes/E0244.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/error-codes/E0244.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/E0244/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/E0244/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] ------------------------------------------
[00:46:53] stderr:
[00:46:53] stderr:
[00:46:53] ------------------------------------------
[00:46:53] {"message":"wrong number of type arguments: expected 0, found 2","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/error-codes/E0244.rs","byte_start":512,"byte_end":521,"line_start":12,"line_end":12,"column_start":23,"column_end":32,"is_primary":true,"text":[{"text":"struct Bar<S, T> { x: Foo<S, T> }","highlight_start":23,"highlight_end":32}],"label":"2 unexpected type arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 0, found 2\n  --> /checkout/src/test/ui/error-codes/E0244.rs:12:23\n   |\nLL | struct Bar<S, T> { x: Foo<S, T> }\n   |                       ^^^^^^^^^ 2 unexpected type arguments\n\n"}
[00:46:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] 
[00:46:53] thread '[ui] ui/error-codes/E0244.rs' de":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/generic/generic-arg-mismatch-recover.rs","byte_start":554,"byte_end":561,"line_start":16,"line_end":16,"t Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/generic/generic-arg-mismatch-recover.rs","byte_start":678,"byte_end":680,"line_start":19,"line_end":19,"column_start":29,"column_end":31,"is_primary":true,"text":[{"text":"    Bar::<'static, 'static, ()>(&()); //~ ERROR wrong number of lifetime arguments","high:53] 3    |
[00:46:53] 4 LL |     Foo::<isize>::new();
[00:46:53] 6 
[00:46:53] 7 error: aborting due to previous error
[00:46:53] 8 
[00:46:53] - For more information about this error, try `rustc --explain E0243`.
[00:46:53] - For more information about this error, try `rustc --explain E0243`.
[00:46:53] + For more information about this error, try `rustc --explain E0107`.
[00:46:53] 10 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generic/generic-impl-less-params-with-defaults/generic-impl-less-params-with-defaults.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args generic/generic-impl-less-params-with-defaults.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/generic/generic-impl-less-params-with-defaults.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/generic/generic-impl-less-params-with-defaults/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/generic/generic-impl-less-params-with-defaults/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] 
[00:46:53] -------------------------------------st 2, found 3
[00:46:53] 3    |
[00:46:53] 3    |
[00:46:53] 4 LL |     Vec::<isize, Heap, bool>::new();
[00:46:53] 6 
[00:46:53] 7 error: aborting due to previous error
[00:46:53] 8 
[00:46:53] - For more information about this error, try `rustc --explain E0244`.
[00:46:53] - For more information about this error, try `rustc --explain E0244`.
[00:46:53] + For more information about this error, try `rustc --explain E0107`.
[00:46:53] 10 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generic/generic-impl-more-params-with-defaults/generic-impl-more-params-with-defaults.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args generic/generic-impl-more-params-with-defaults.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/generic/generic-impl-more-params-with-defaults.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/generic/generic-impl-more-params-with-defaults/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/generic/generic-impl-more-params-with-defaults/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] ------------------------------------------
[00:46:53] stderr:
[00:46:53] stderr:
[00:46:53] ------------------------------------------
[00:46:53] {"message":"wrong number of type arguments: expected at most 2, found 3","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/generic/generic-impl-more-params-with-defaults.rs","byte_start":653,"byte_end":682,"line_start":23,"line_end":23,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"    Vec::<isize, Heap, bool>::new();","highlight_start":5,"highlight_end":34}],"label":"expected at most 2 type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected at most 2, found 3\n  --> /checkout/src/test/ui/generic/generic-impl-more-params-with-defaults.rs:23:5\n   |\nLL |     Vec::<isize, Heap, bool>::new();\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type argument\n\n"}
[00:46:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/generic/generic-impl-more-params-with-defaults.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/generic/generic-type-less-params-with-defaults.rs stdout ----
[00:46:53] diff of stderr:
[00:46:53] 
[00:46:53] - error[E0243]:ng number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/generic/generic-type-less-params-with-defaults.rs","byte_start":581,"byte_end":584,"line_start":19,"line_end":19,"column_start":12,"column_end":15,"is_primary":true,"text":[{"text":"    let _: Vec;","highlight_start":12,"highlight_end":15}],"label":"expected at least 1 type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected at least 1, found 0\n  --> /checkout/src/test/ui/generic/generic-type-less-params-with-defaults.rs:19:12\n   |\nLL |     let _: Vec;\n   |            ^^^ expected at least 1 type argument\n\n"}
[00:46:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/generic/generic-type-less-params-with-defaults.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
---
[00:46:53] - error[E0087]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 2   --> $DIR/issue-53251.rs:21:24
[00:46:53] 3    |
[00:46:53] 4 LL |                 S::f::<i64>();
[00:46:53] 9 
[00:46:53] 10 error: aborting due to previous error
[00:46:53] 11 
[00:46:53] - For more information about this error, try `rustc --explain E0087`.
[00:46:53] - For more information about this error, try `rustc --explain E0087`.
[00:46:53] + For more information about this error, try `rustc --explain E0107`.
[00:46:53] 13 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issue-53251/issue-53251.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args issue-53251.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-53251.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/issue-53251/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/issue-53251/auxiliary\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-14092.rs","byte_start":477,"byte_end":480,"line_start":11,"line_end":11,"column_start":11,"column_end":14,"is_primary":true,"text":[{"text":"fn fn1(0: Box) {}","highlight_start":11,"highlight_end":14}],"label":"expected 1 type argument","suggested_replacement":null,"suggestion_apoccurred: E0107, E0191, E0658.
[00:46:53] 25 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-23024/issue-23024.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args issues/issue-23024.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-23024.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-23024/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-23024/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] ------------------------------------------
[00:46:53] stderr:
[00:46:53] stderr:
[00:46:53] ------------------------------------------
[00:46:53] {"message":"the precise format of `Fn`-family traits' type parameters is subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead (see issue #29625)","code":{"code":"E0658","explanation":"\nAn unstable feature was used.\n\nErroneous code example:\n\n```compilspecified\n  --> /checkout/src/test/ui/issues/issue-23024.rs:19:35\n   |\nLL |     println!(\"{:?}\",(vfnfer[0] as Fn)(3));\n   |                                   ^^ missing associated type `Output` value\n\n"}
[00:46:53] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:46:53] {"message":"Some errors occurred: E0107, E0191, E0658.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0107, E0191, E0658.\n"}
[00:46:53] {"message":"For more information about an error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/issues/issue-23024.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/issues/issue-3214.rs stdout ----
[00:46:53] diff of stderr:
[00:46:53] 
[00:46:53] 9 LL |         x: T, //~ ERROR can't use type parameters from outer function
[00:46:53] 10    |            ^ use of type variable from outer function
[00:46:53] - error[E0244]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 13   --> $DIR/issue-3214.rs:16:26
[00:46:53] 14    |
[00:46:53] 14    |
[00:46:53] 15 LL |     impl<T> Drop for foo<T> {
[00:46:53] 17 
[00:46:53] 18 error: aborting due to 2 previous errors
[00:46:53] 19 
[00:46:53] - Some errors occurred: E0244, E0401.
---
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-3214/issue-3214.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args issues/issue-3214.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-3214.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-3214/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-3214/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] ------------------------------------------
[00:46:53] stderr:
[00:46:53] stderr:
[00:46:53] ------------------------------------------
[00:46:53] {"message":"can't use type parameters from outer function","code":{"code":"E0401","explanation":"\nInner items do not inherit type parameters from the functions they are embedded\nin.\n\nErroneous code example:\n\n```compile_fail,E0401\nfn foo<T>(x: T) {\n    fn bar(y: T) { // T is defined in the \"outer\" function\n        // ..\n    }\n    bar(x);\n}\n```\n\nNor will this:\n\n```compile_fail,E0401\nfn foo<T>(x: T) {\n    type MaybeT = Option<T>;\n    // ...\n}\n```\n\nOr this:\n\n```compile_fail,E0401\nfn foo<T>(x: T) {\n    struct Foo {\n        x: T,\n    }\n    // ...\n}\n```\n\nItems inside functions are basically just like top-level items, except\nthat they can only be used from the function they are in.\n\nThere are a couple of solutions for this.\n\nIf the item is a function, you may use a closure:\n\n```\nfn foo<T>(x: T) {\n    let bar = |y: T| { // explicit type annotation may not be necessary\n        // ..\n    };\n    bar(x);\n}\n```\n\nFor a generic item, you can copy over the parameters:\n\n```\nfn foo<T>(x: T) {\n    fn bar<T>(y: T) {\n        // ..\n    }\n    bar(x);\n}\n```\n\n```\nfn foo<T>(x: T) {\n    type MaybeT<T> = Option<T>;\n}\n```\n\nBe sure to copy over any bounds as well:\n\n```\nfn foo<T: Copy>(x: T) {\n    fn bar<T: Copy>(y: T) {\n        // ..\n    }\n    bar(x);\n}\n```\n\n```\nfn foo<T: Copy>(x: T) {\n    struct Foo<T: Copy> {\n        x: T,\n    }\n}\n```\n\nThis may require additional type hints in the function body.\n\nIn case the item is a function inside an `impl`, defining a private helper\nfunction might be easier:\n\n```\n# struct Foo<T>(T);\nimpl<T> Foo<T> {\n    pub fn foo(&self, x: T) {\n        self.bar(x);\n    }\n\n    fn bar(&self, y: T) {\n        // ..\n    }\n}\n```\n\nFor default impls in traits, the privatected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-3214.rs","byte_start":600,"byte_end":601,"line_start":16,"line_end":16,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":"    impl<T> Drop for foo<T> {","highlight_start":26,"highlight_end":27}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 0, found 1\n  --> /checkout/src/test/ui/issues/issue-3214.rs:16:26\n   |\nLL |     impl<T> Drop for foo<T> {\n   |                          ^ unexpected type argument\n\n"}
[00:46:53] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:46:53] {"message":"Some errors occurred: E0107, E0401.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0107, E0401.\n"}
[00:46:53] {"message":"For more information about an error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/issues/issue-3214.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/methods/method-call-lifetime-args-fail.rs stdout ----
[00:46:53] diff of stderr:
[00:46:53] 
[00:46:53] - error[E0090]: wrong number of lifetime arguments: expected 2, foun,"column_end":12,"is_primary":true,"text":[{"text":"    S.early::<'static>();","highlight_start":7,"highlight_end":12}],"label":"expected 2 lifetime arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expected 2, found 1\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:26:7\n   |\nLL |     S.early::<'static>();\n   |       ^^^^^ expected 2 lifetime arguments\n\n"}
[00:46:53] {"message":"wrong number of lifetime arguments: expected 2, found 3","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // erro[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":661,"byte_end":663,"line_start":17,"line_end":17,"column_start":19,"column_end":21,"is_primary":true,"text":[{"text":"    fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} }","highlight_start":19,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:44:21\n   |\nLL |     S::late_early::<'static, 'static>(S, &0);\n   |                     ^^^^^^^\n   |\nnote: the late bound lifetime parameter is introduced here\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:17:19\n   |\nLL |     fn late_early<'a, 'b>(self, _: &'a u8) -> &'b u8 { loop {} }\n   |                   ^^\n\n"}
[00:46:53] {"message":"cannot specify lifetime arguments explicitly if late bound lifetime parameters are present","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":1840,"byte_end":1847,"line_start":46,"line_end":46,"column_start":21,"column_end":28,"is_primary":true,"text":[{"text":"    S::late_early::<'static, 'static, 'static>(S, &0);","highlight_start":21,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the late bound lifetime parameter is introduced here","code":null,"level":"note","spans":[{"file_eckout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":568,"byte_end":568,"line_start":15,"line_end":15,"column_start":31,"column_end":31,"is_primary":true,"text":[{"text":"    fn late_implicit(self, _: &u8, _: &u8) {}","highlight_start":31,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:50:24\n   |\nLL |     S::late_implicit::<'static>(S, &0, &0);\n   |                        ^^^^^^^\n   |\nnote: the late bound lifetime parameter is introduced here\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:15:31\n   |\nLL |     fn late_implicit(self, _: &u8, _: &u8) {}\n   |                               ^\n\n"}
[00:46:53] {"message":"cannot specify lifetime arguments explicitly if late bound lifetime parameters are present","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":2102,"byte_end":2109,"line_start":52,"line_end":52,"column_start":24,"column_end":31,"is_primary":true,"text":[{"text":"    S::late_implicit::<'static, 'static>(S, &0, &0);","highlight_start":24,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the late bound lifetime parameter is introduced here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-ca/method-call-lifetime-args-fail.rs","byte_start":748,"byte_end":748,"line_start":18,"line_end":18,"column_start":41,"column_end":41,"is_primary":true,"text":[{"text":"    fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} }","highlight_start":41,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:59:30\n   |\nLL |     S::late_implicit_early::<'static, 'static, 'static>(S, &0);\n   |                              ^^^^^^^\n   |\nnote: the late bound lifetime parameter is introduced here\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:18:41\n   |\nLL |     fn late_implicit_early<'b>(self, _: &u8) -> &'b u8 { loop {} }\n   |                                         ^\n\n"}
[00:46:53] {"message":"cannot specify lifetime arguments explicitly if late bound lifetime parameters are present","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":2671,"byte_end":2678,"line_start":62,"line_end":62,"column_start":35,"column_end":42,"is_primary":true,"text":[{"text":"    S::late_implicit_self_early::<'static, 'static>(&S);","highlight_start":35,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the late bound lifetime parameter is introduced here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":811,"byte_end":811,"line_start":19,"line_end":19,"column_start":37,"column_end":37,"is_primary":true,"text":[{"text":"    fn late_implicit_self_early<'b>(&self) -> &'b u8 { loop {} }","highlight_start":37,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:62:35\n   |\nLL |     S::late_implicit_self_early::<'static, 'static>(&S);\n   |                                   ^^^^^^^\n   |\nnote: the late bound lifetime parameter is introduced here\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:19:37\n   |\nLL |     fn late_implicit_self_early<'b>(&self) -> &'b u8 { loop {} }\n   |                                     ^\n\n"}
[00:46:53] {"message":"cannot specify lifetime arguments explicitly if late bound lifetime parameters are present","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":2788,"byte_end":2795,"line_start":64,"line_end":64,"column_start":35,"column_end":42,"is_primary":true,"text":[{"text":"    S::late_implicit_self_early::<'static, 'static, 'static>(&S);","highlight_start":35,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the late bound lifetime parameter is introduced here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":811,"byte_end":811,"line_start":19,"line_end":19,"column_start":37,"column_end":37,"is_primary":true,"text":[{"text":"    fn late_implicit_self_early<'b>(&self) -> &'b u8 { loop {} }","highlight_start":37,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:64:35\n   |\nLL |     S::late_implicit_self_early::<'static, 'static, 'static>(&S);\n   |                                   ^^^^^^^\n   |\nnote: the late bound lifetime parameter is introduced here\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:19:37\n   |\nLL |     fn late_implicit_self_early<'b>(&self) -> &'b u8 { loop {} }\n   |                                     ^\n\n"}
[00:46:53] {"message":"cannot specify lifetime arguments explicitly if late bound lifetime parameters are present","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":2942,"byte_end":2949,"line_start":67,"line_end":67,"column_start":28,"column_end":35,"is_primary":true,"text":[{"text":"    S::late_unused_early::<'static, 'static>(S);","highlight_start":28,"highlight_end":35}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lE0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs","byte_start":3170,"byte_end":3189,"line_start":73,"line_end":73,"column_start":5,"column_end":24,"is_primary":true,"text":[{"text":"    S::early::<'static>(S);","highlight_start":5,"highlight_end":24}],"label":"expected 2 lifetime arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of lifetime arguments: expected 2, found 1\n  --> /checkout/src/test/ui/methods/method-call-lifetime-args-fail.rs:73:5\n   |\nLL |     S::early::<'static>(S);\n   |     ^^^^[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/seq-args.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/structs/structure-constructor-type-mismatch.rs stdout ----
[00:46:53] diff of stderr:
[00:46:53] 
[00:46:53] 70    = note: expected type `f32`
[00:46:53] 71               found type `{integer}`
[00:46:53] - error[E0244]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 74   --> $DIR/structure-constructor-type-mismatch.rs:58:24
[00:46:53] 75    |
[00:46:53] 75    |
[00:46:53] 76 LL |     let pt3 = PointF::<i32> { //~ ERROR wrong number of type arguments
[00:46:53] 100    = note: expected type `f32`
[00:46:53] 100    = note: expected type `f32`
[00:46:53] 101               found type `{integer}`
[00:46:53] - error[E0244]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 104   --> $DIR/structure-constructor-type-mismatch.rs:64:18
[00:46:53] 105    |
[00:46:53] 105    |
[00:46:53] 106 LL |         PointF::<u32> { .. } => {} //~ ERROR wrong number of type arguments
[00:46:53] 135 
[00:46:53] 136 error: aborting due to 13 previous errors
[00:46:53] -------------
[00:46:53] -------------
[00:46:53] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":652,"byte_end":653,"line_start":27,"line_end":27,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        x: 1,","highlight_start":12,"highlight_end":13}],"label":"expected f32, found integral variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `f32`\n   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"use a float literal","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":652,"byte_end":653,"line_start":27,"line_end":27,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        x: 1,","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"1.0","suggestion_avariable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":992,"byte_end":993,"line_start":39,"line_end":39,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        y: 4,","highlight_start":12,"highlight_end":13}],"label":"expected f32, found integral variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `f32`\n   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"use a float literal","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":992,"byte_end":993,"line_start":39,"line_end":39,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        y: 4,","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"4.0","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs:39:12\n   |\nLL |         y: 4,\n   |            ^\n   |            |\n   |            expected f32, found integral variable\n   |            help: use a float literal: `4.0`\n   |\n   = note: expected type `f32`\n              found type `{integer}`\n\n"}
[00:46:53] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":1124,"byte_end":1125,"line_start":45,"line_end":45,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        x: 5,","highlight_start":12,"highlight_end":13}],"label":"expected f32, found integral variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `f32`\n   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"use a float literal","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":1124,"byte_end":1125,"line_start":45,"line_end":45,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        x: 5,","highlight_start":12,"highlight_end":13}],"label":null,"suggested_replacement":"5.0","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs:45:12\n   |\nLL |         x: 5,\n   |            ^\n   |            |\n   |            expected f32, found integral variable\n   |            help: use a float literal: `5.0`\n   |\n   = note: expected type `f32`\n              found type `{integer}`\n\n"}
[00:46:53] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":1278,"byte_end":1279,"line_start":52,"line_end":52,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        x: 7,","highlight_start":12,"highlight_end":13}],"label":"expected f32, found integral variable","suggested_replacement":null,"//~ ERROR wrong number of type arguments\n   |                        ^^^ unexpected type argument\n\n"}
[00:46:53] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":1472,"byte_end":1473,"line_start":59,"line_end":59,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":"        x: 9,  //~ ERROR mismatched types","highlight_start":12,"highlight_end":13}],"label":"expected f32, found integral variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `f32`\n   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"use a float literal","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":1472,"byte_end":1473,"line_start":59,"line_end":59,"column_start":12,"column_end":13,"is_primary":true,"text":found 1\n  --> /checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs:64:18\n   |\nLL |         PointF::<u32> { .. } => {} //~ ERROR wrong number of type arguments\n   |                  ^^^ unexpected type argument\n\n"}
[00:46:53] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/structs/structure-constructor-type-mismatch.rs","byte_start":1596,"byte_end":1616,"line_start":64,"line_end":64,"column_start":9,"column_end":29,"is_primary":true,"text":[{"text":"        PointF::<u32> { .. } => {} //~ ERROR wrong number of type arguments","highlight_start":9,"highlight_end":29}],"label":"expected integral variable, found f32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `Point<{integer}>`\n   found type `Point<f32>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/structs/structure-construco: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/tag-type-args.rs","byte_start":548,"byte_end":552,"line_start":15,"line_end":15,"column_start":11,"column_end":15,"is_primary":true,"text":[{"text":"fn foo(c: quux) { assert!((false)); }","highlight_start":11,"highlight_end":15}],"label":"expected 1 type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}error, try `rustc --explain E0107`.
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-object-vs-lifetime/trait-object-vs-lifetime.stderr
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-object-vs-lifetime/trait-object-vs-lifetime.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args traits/trait-object-vs-lifetime.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/traits/trait-object-vs-lifetime.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-object-vs-lifetime/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "continue-parse-after-error" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-object-vs-lifetime/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] ------------------------------------------
[00:46:53] stderr:
[00:46:53] stderr:
[00:46:53] ------------------------------------------
[00:46:53] {"message":"lifetime parameters must be declared prior to type parameters","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-object-vs-lifetime.rs","byte_start":1125,"byte_end":1132,"line_start":26,"line_e      //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-object-vs-lifetime.rs","byte_start":942,"byte_end":961,"line_start":23,"line_end":23,"column_start":12,"column_end":31,"is_primary":true,"text":[{"text":"    let _: S<'static, 'static>;","highlight_start":12,"highlight_end":31}],"label":"expected 1 type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 1, found 0\n  --> /checkout/src/test/ui/traits/trait-object-vs-lifetime.rs:23:12\n   |\nLL |     let _: S<'static, 'static>;\n   |            ^^^^^^^^^^^^^^^^^^^ expected 1 type argument\n\n"}
[00:46:53] {"message":"at least one non-builtin trait is required for an object type","code":{"code":"E0224","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-object-vs-lifetime.rs","byte_start":1114,"byte_end":1123,"line_start":26,"line_end":26,"column_start":14,"column_end":23,"is_primary":true,"text":[{"text":"    let _: S<'static +, 'static>;","highlight_start":14,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0224]: at least one non-builtin trait is required for an object type\n  --> /checkout/src/test/ui/traits/trait-object-vs-lifetime.rs:26:14\n   |\nLL |     let _: S<'static +, 'static>;\n   |              ^^^^^^^^^\n\n"}
[00:46:53] {"message":"aborting due to 5 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 5 previous errors\n\n"}
[00:46:53] {"message":"Some errors occurred: E0107, E0224.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0107, E0224.\n"}
[00:46:53] {"message":"For more information about an error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/traits/trait-object-vs-lifetime.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/traits/trait-test-2.rs stdout ----
[00:46:53] diff of stderr:
[00:46:53] 
[00:46:53] - error[E0087]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 2   --> $DIR/trait-test-2.rs:18:14
[00:46:53] 3    |
[00:46:53] 4 LL |     10.dup::<i32>(); //~ ERROR wrong number of type arguments: expected 0, found 1
[00:46:53] 5    |              ^^^ unexpected type argument
[00:46:53] 6 
[00:46:53] - error[E0087]: wrong number of type arguments: expected 1, found 2
[00:46:53] + error[E0107]: wrong number of type arguments: expected 1, found 2
[00:46:53] + error[E0107]: wrong number of type arguments: expected 1, found 2
[00:46:53] 8   --> $DIR/trait-test-2.rs:19:20
[00:46:53] 9    |
[00:46:53] 10 LL |     10.blah::<i32, i32>(); //~ ERROR wrong number of type arguments: expected 1, found 2
[00:46:53] 37 
[00:46:53] 38 error: aborting due to 5 previous errors
[00:46:53] 39 
[00:46:53] - Some errors occurred: E0038, E0087, E0277.
[00:46:53] - Some errors occurred: E0038, E0087, E0277.
[00:46:53] + Some errors occurred: E0038, E0107, E0277.
[00:46:53] 41 For more information about an error, try `rustc --explain E0038`.
[00:46:53] 42 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-test-2/trait-test-2.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args traits/trait-test-2.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/traits/trait-test-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/traits/trait-test-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/traits/trait-test-2/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] ------------------------------------------
[00:46:53] stderr:
[00:46:53] stderr:
[00:46:53] ------------------------------------------
[00:46:53] {"message":"wrong number of type arguments: expected 0, found 1","code":{"code":"E0107","explanation":"\nThisnd 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/traits/trait-test-2.rs","byte_start":809,"byte_end":812,"line_start":19,"line_end":19,"column_start":20,"column_end":23,"is_primary":true,"text":[{"text":"    10.blah::<i32, i32>(); //~ ERROR wrong number of type arguments: expected 1, found 2","highlight_start":20,"highlight_end":23}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 1, found 2\n  --> /checkout/src/test/ui/traits/trait-test-2.rs:19:20\n   |\nLL |     10.blah::<i32, i32>(); //~ ERROR wrong number of type arguments: expected 1, found 2\n   |                    ^^^ unexpected type argument\n\n"}
[00:46:53] {"message":"the trait bound `dyn bar: bar` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementingn add a `where Self: Sized` bound\non them to mark them as explicitly unavailable to trait objects. The\nfunctionality will still be available to all other implementers, including\n`Box<Trait>` which is itself sized (assuming you `impl Trait for Box<Trait>`).\n\n```\ntrait Trait {\n    fn foo(&self) -> Self where Self: Sized;\n    // more functions\n}\n```\n\nNow, `foo()` can no longer be called on a trait object, but you will now be\nallowed to make a trait object, and that will be able to call any object-safe\nmethods. With such a bound, one can still call `foo()` on types implementing\nthat trait that aren't behind trait objects.\n\n### Method has generic type parameters\n\nAs mentioned before, trait objects contain pointers to method tables. So, if we\nhave:\n\n```\ntrait Trait {\n    fn foo(&self);\n}\n\nimpl Trait for String {\n    fn foo(&self) {\n        // implementation 1\n    }\n}\n\nimpl Trait for u8 {\n    fn foo(&self) {\n        // implementation 2\n    }\n}\n// ...\n```\n\nAt compile time each implementation of `Trait` will produce a table containing\nthe various methods (and other items) related to the implementation.\n\nThis works fine, but when the method gains generic parameters, we can have a\nproblem.\n\nUsually, generic parameters get _monomorphized_. For example, if I have\n\n```\nfn foo<T>(x: T) {\n    // ...\n}\n```\n\nThe machine code for `foo::<u8>()`, `foo::<bool>()`, `foo::<String>()`, or any\nother type substitution is different. Hence the compiler generates the\nimplementation on-demand. If you call `foo()` with a `bool` parameter, the\ncompiler will only generate code for `foo::<bool>()`. Whenwhere Self: Sized {\n\n}\n```\n\nWe cannot create an object of type `Box<Foo>` or `&Foo` since in this case\n`Self` would not be `Sized`.\n\nGenerally, `Self : Sized` is used to indicate that the trait should not be used\nas a trait object. If the trait comes from your own crate, consider removing\nthis restriction.\n\n### Method references the `Self` type in its arguments or return type\n\nThis happens when a trait has a method like the following:\n\n```\ntrait Trait {\n    fn foo(&self) -> Self;\n}\n\nimpl Trait for String {\n    fn foo(&self) -> Self {\n        \"hi\".to_owned()\n    }\n}\n\nimpl Trait for u8 {\n    fn foo(&self) -> Self {\n        1\n    }\n}\n```\n\n(Note that `&self` and `&mut self` are okay, it's additional `Self` types which\ncause this problem.)\n\nIn such a case, the compiler cannot predict the return type of `foo()` in a\nsituation like the following:\n\n```compile_fail\ntrait Trait {\n    fn foo(&self) -> Self;\n}\n\nfn call_foo(x: Box<Trait>) {\n    let y = x.foo(); // What type is y?\n    // ...\n}\n```\n\nIf only some methods aren't object-safe, you can add a `where Self: Sized` bound\non them to mark them as explicitly unavailable to trait objects. The\nfunctionality will still be available to all other implementers, including\n`Box<Trait>` which is itself sized (assuming you `impl Trait for Box<Trait>`).\n\n```\ntrait Trait {\n    fn foo(&self) -> Self where Self: Sized;\n    // more functions\n}\n```\n\nNow, `foo()` can no longer be called on a trait object, but you will now be\nallowed to make a trait object, and that will be able to call any object-safe\nmethods. With such a bound, one can and there could\ntheoretically be an infinite number of types.\n\nFor example, with:\n\n```\ntrait Trait {\n    fn foo<T>(&self, on: T);\n    // more methods\n}\n\nimpl Trait for String {\n    fn foo<T>(&self, on: T) {\n        // implementation 1\n    }\n}\n\nimpl Trait for u8 {\n    fn foo<T>(&self, on: T) {\n        // implementation 2\n    }\n}\n\n// 8 more implementations\n```\n\nNow, if we have the following code:\n\n```compile_fail,E0038\n# trait Trait { fn foo<T>(&self, on: T); }\n# impl Trait for String { fn foo<T>(&self, on: T) {} }\n# impl Trait for u8 { fn foo<T>(&self, on: T) {} }\n# impl Trait for bool { fn foo<T>(&self, on: T) {} }\n# // etc.\nfn call_foo(thing: Box<Trait>) {\n    thing.foo(true); // this could be any one of the 8 types above\n    thing.foo(1);\n    thing.foo(\"hello\");\n}\n```\n\nWe don't just need to create a table of all implementations of all methods 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 number\nof types you intend to feed to this method is li0:46:53] - error[E0244]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 9    |
[00:46:53] 9    |
[00:46:53] 10 LL | trait Trait: Copy<Send> {}
[00:46:53] 11    |                   ^^^^ unexpected type argument
[00:46:53] 12 
[00:46:53] - error[E0244]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 14   --> $DIR/typeck-builtin-bound-type-parameters.rs:17:26
[00:46:53] 15    |
[00:46:53] 16 LL | struct MyStruct1<T: Copy<T>>;
[00:46:53] 
[00:46:53] 28 LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
[00:46:53] 29    |                    ^^ unexpected lifetime argument
[00:46:53] - error[E0244]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 32   --> $DIR/typeck-builtin-bound-type-parameters.rs:24:24
[00:46:53] 33    |
[00:46:53] 33    |
[00:46:53] 34 LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
[00:46:53] 36 
[00:46:53] 37 error: aborting due to 6 previous errors
[00:46:53] 38 
[00:46:53] - Some errors occurred: E0107, E0244.
[00:46:53] - Some errors occurred: E0107, E0244.
[00:46:53] - For more information about an error, try `rustc --explain E0107`.
[00:46:53] + For more information about this error, try `rustc --explain E0107`.
[00:46:53] 41 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/typeck/typeck-builtin-bound-type-parameters/typeck-builtin-bound-type-parameters.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args typeck/typeck-builtin-bound-type-parameters.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/typeck/typeck-builtin-bound-type-parameters.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/typeck/typeck-builtin-bound-type-parameters/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/typeck/typeck-builtin-bound-type-parameters/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] ------------------------------------------
[00:46:53] stderr:
[00:46:53] stderr:
[00:46:53] ------------------------------------------
[00:46:53] {"message":"wrong number of type arguments: expected 0, found 1","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs","byte_start":482,"byte_end":483,"line_start":11,"line_end":11,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"fn foo1<T:Copy<U>, U>(x: T) {}","highlight_start":16,"highlight_end":17}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 0, //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs","byte_start":694,"byte_end":695,"line_start":17,"line_end":17,"column_start":26,"column_end":27,"is_primary":true,"text":[{"text":"struct MyStruct1<T: Copy<T>>;","highlight_start":26,"highlight_end":27}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 0, found 1\n  --> /checkout/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs:17:26\n   |\nLL | struct MyStruct1<T: Copy<T>>;\n   |                          ^ unexpected type argument\n\n"}
[00:46:53] {"message":"wrong number of lifetime arguments: expected 0, found 1","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,Euct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs","byte_start":907,"byte_end":908,"line_start":24,"line_end":24,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}","highlight_start":24,"highlight_end":25}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 0, found 1\n  --> /checkout/src/test/ui/typeck/typeck-builtin-bound-type-parameters.rs:24:24\n   |\nLL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}\|     let c: Foo<_, _> = Foo { r: &5 };\n   |                   ^ unexpected type argument\n\n"}
[00:46:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/typeck/typeck_type_placeholder_lifetime_1.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/typeck/typeck_type_placeholder_lifetime_2.rs stdout ----
[00:46:53] diff of stderr:
[00:46:53] 
[00:46:53] - error[E0244]: wrong number of type arguments: expected 1, found 2
[00:46:53] + error[E0107]: wrong number of type arguments: expected 1, found 2
[00:46:53] 2   --> $DIR/typeck_type_placeholder_lifetime_2.rs:19:19
[00:46:53] 3    |
[00:46:53] 4 LL |     let c: Foo<_, usize> = Foo { r: &5 };
[00:46:53] 6 
[00:46:53] 7 error: aborting due to previous error
[00:46:53] 8 
[00:46:53] - For more information about this error, try `rustc --explain E0244`.
[00:46:53] - For more information about this error, try `rustc --explain E0244`.
[00:46:53] + For more information about this error, try `rustc --explain E0107`.
[00:46:53] 10 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/typeck/typeck_type_placeholder_lifetime_2/          //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/typeck/typeck_type_placeholder_lifetime_2.rs","byte_start":647,"byte_end":652,"line_start":19,"line_end":19,"column_start":19,"column_end":24,"is_primary":true,"text":[{"text":"    let c: Foo<_, usize> = Foo { r: &5 };","highlight_start":19,"highlight_end":24}],"label":"unexpected type argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0107]: wrong number of type arguments: expected 1, found 2\n  --> /checkout/src/test/ui/typeck/typeck_type_placeho<String as IntoCow>::into_cow(\"foo\".to_string());\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 type argument\n\n"}
[00:46:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:53] {"message":"For more information about this error, try `rustc --explain E0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/ufcs/ufcs-qpath-missing-params.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs stdout ----
[00:46:53] diff of stderr:
[00:46:53] 
[00:46:53] - error[E0243]: wrong number of type arguments: expected 3, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 3, found 1
[00:46:53] 2   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs:15:12
[00:46:53] 3    |
[00:46:53] 4 LL | fn foo(_: &Three())
[00:46:53] 12 
[00:46:53] 13 error: aborting due to 2 previous errors
[00:46:53] 14 
[00:46:53] - Some errors occurred: E0220, E0243.
[00:46:53] - Some errors occurred: E0220, E0243.
[00:46:53] - For more information about an error, try `rustc --explain E0220`.
[00:46:53] + Some errors occurred: E0107, E0220.
[00:46:53] + For more information about an error, try `rustc --explain E0107`.
[00:46:53] 17 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3/unboxed-closure-sugar-wrong-number-number-type-parameters-3.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3/auxiliary" "-A" "unused"
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] ------------------------------------------
[00:46:53] stderr:
[00:46:53] stderr:
[00:46:53] ------------------------------------------
[00:46:53] {"message":"wrong number of type arguments: expected 3, found 1","code":{"code":"E0107","explanation":"\nThis error means that an incorrect number of type or lifetime parameters\nwere provided:\n\n```compile_fail,E0107\nstruct Foo<'a, 'b>(&'a str, &'b str);\nenum Bar { A, B, C }\n\nstruct Baz<'a> {\n    foo: Foo<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 2, found 1\n    bar: Bar<'a>, // error: wrong number of lifetime arguments:\n                  //        expected 0, found 1\n}\n```\n\n```compile_fail,E0107\nstruct Foo<T> { x: T }\n\nstruct Bar { x: Foo }             // error: wrong number of type arguments:\n                                  //        expected 1, found 0\nstruct Baz<S, T> { x: Foo<S, T> } // error: wrong number of type arugemtns:\n                                  //        expected 1, found 2\n```\n\n```compile_fail,E0107\nfn foo<T, U>(x: T) {}\n\nfn main() {\n    let x: bool = true;\n    foo::<f64>(x);           // error: wrong number of type arguments:\n                             //        expected 2, found 1\n    foo::<f64, f64, i32>(x); // error: wrong number of type arguments:\n                             //        expected 2, found 3\n}\n```\n\n```compile_fail,E0088\nfn f<'a>() {}\n\nfn main() {\n    f()                 // error: wrong number of lifetime arguments:\n                        //        expected 1, found 0\n    f::<'static, 'b>() // error: wrong number of lifetime arguments:\n                        //        expected 0, found 2\n}\n```\n\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters-3.rs","byte_start":561,"byte_end":568,"line_start":15,"line_end":15,"column_start":12,"column_f type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 2   --> $DIR/unboxed-closure-sugar-wrong-number-number-type-parameters.rs:15:15
[00:46:53] 3    |
[00:46:53] 4 LL | fn foo(_: Zero())
[00:46:53] 12 
[00:46:53] 13 error: aborting due to 2 previous errors
[00:46:53] 14 
[00:46:53] - Some errors occurred: E0220, E0244.
---
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters/unboxed-closure-sugar-wrong-number-number-type-parameters.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs`
[00:46:53] error: 1 errors occurred comparing output.
[00:46:53] status: exit code: 1
[00:46:53] status: exit code: 1
[00:46:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.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/unboxed-closures/unb0107`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0107`.\n"}
[00:46:53] ------------------------------------------
[00:46:53] 
[00:46:53] thread '[ui] ui/unboxed-closures/unboxed-closure-sugar-wrong-number-number-type-parameters.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:46:53] 
[00:46:53] 
[00:46:53] ---- [ui] ui/unboxed-closures/unboxed-closure-sugar-wrong-trait.rs stdout ----
[00:46:53] diff of stderr:
[00:46:53] 
[00:46:53] - error[E0244]: wrong number of type arguments: expected 0, found 1
[00:46:53] + error[E0107]: wrong number of type arguments: expected 0, found 1
[00:46:53] 2   --> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:13
[00:46:53] 3    |
[00:46:53] 4 LL | fn f<F:Trait(isize) -> isize>(x: F) {}
[00:46:53] 12 
[00:46:53] 13 error: aborting due to 2 previous errors
[00:46:53] 14 
[00:46:53] - Some errors occurred: E0220, E0244.
[00:46:53] - Some errors occurred: E0220, E0244.
[00:46:53] - For more information about an error, try `rustc --explain E0220`.
[00:46:53] + Some errors occurred: E0107, E0220.
[00:46:53] + For more information about an error, try `rustc --explain E0107`.
[00:46:53] 17 
[00:46:53] 
[00:46:53] 
[00:46:53] The actual stderr differed from the expected stderr.
[00:46:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/unboxed-closures/unboxed-closure-sugar-wrong-trait/unboxed-closure-sugar-wrong-trait.stderr
[00:46:53] To update references, rerun the tests and pass the `--bless` flag
[00:46:53] To only update this specific test, also pass `--test-args unboxed-clo  [ui] ui/issues/issue-14092.rs
[00:46:53]     [ui] ui/issues/issue-3214.rs
[00:46:53]     [ui] ui/methods/method-call-lifetime-args-fail.rs
[00:46:53]     [ui] ui/seq-args.rs
[00:46:53]     [ui] ui/structs/structure-constructor-type-mismatch.rs
---
[00:46:53] test result: FAILED. 4110 passed; 30 failed; 20 ignored; 0 measured; 0 filtered out
[00:46:53] 
[00:46:53] 
[00:46:53] 
[00:46:53] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/u_time:start:28bd9afe

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)

@varkor
Copy link
Member

varkor commented Aug 23, 2018

@mcr431: that looks good, thanks! (I think git has recorded users for the author/committer for your commits, which is why it's showing up as two different users on here — it's not a huge problem, but it might mean you're not attributed when the pull request gets merged — if you didn't find the rebase too much of a pain, you could try overwriting the author for each commit so that the right name/email was being used 😄.)

@matthew-russo
Copy link
Contributor Author

Yeah I had set up a dummy account to test stuff and forgot to switch it back. When rebasing with fixed test cases I'll make sure it has proper author

@rust-highfive
Copy link
Contributor

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

Click to expand the log.
[00:48:11] ....................................................................................................
[00:48:15] ....................................................................................................
[00:48:17] ...i................................................................................................
[00:48:20] ....................................................................................................
[00:48:23] ...................................................iiiiiiiii........................................
[00:48:28] ....................................................................................................
[00:48:32] ....................................................................................................
[00:48:34] ................................i...................................................................
[00:48:37] ..................................................................................i.i..ii...........
---
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0087::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1809) stdout ----
[01:16:02] error[E0107]: wrong number of type arguments: expected 1, found 2
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:1813:16
[01:16:02]   |
[01:16:02] 5 |     foo::<f64, bool>(); // error: wrong number of type arguments:
[01:16:02]   |                ^^^^ unexpected type argument
[01:16:02] 
[01:16:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0087::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1809)' panicked at 'Some expected error codes were not found: ["E0087"]', librustdoc/test.rs:338:9
[01:16:02] 
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0088::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1826) stdout ----
[01:16:02] error[E0107]: wrong number of lifetime arguments: expected 0, found 1
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:1830:9
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:1830:9
[01:16:02]   |
[01:16:02] 5 |     f::<'static>() // error: wrong number of lifetime arguments:
[01:16:02]   |         ^^^^^^^ unexpected lifetime argument
[01:16:02] 
[01:16:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0088::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1826)' panicked at 'Some expected error codes were not found: ["E0088"]', librustdoc/test.rs:338:9
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0089::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1873) stdout ----
[01:16:02] error[E0107]: wrong number of type arguments: expected 2, found 1
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:1877:5
[01:16:02]   |
[01:16:02]   |
[01:16:02] 5 |     foo::<f64>(); // error: wrong number of type arguments: expected 2, found 1
[01:16:02]   |     ^^^^^^^^^^ expected 2 type arguments
[01:16:02] 
[01:16:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0089::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1873)' panicked at 'Some expected error codes were not found: ["E0089"]', librustdoc/test.rs:338:9
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0090::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1900) stdout ----
[01:16:02] error[E0107]: wrong number of lifetime arguments: expected 2, found 1
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:1904:5
[01:16:02]   |
[01:16:02]   |
[01:16:02] 5 |     foo::<'static>(); // error: wrong number of lifetime arguments:
[01:16:02] 
[01:16:02] 
[01:16:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0090::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1900)' panicked at 'Some expected error codes were not found: ["E0090"]', librustdoc/test.rs:338:9
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0089::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1884) stdout ----
[01:16:02] error[E0107]: wrong number of type arguments: expected 2, found 1
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:1889:5
[01:16:02]   |
[01:16:02]   |
[01:16:02] 6 |     foo::<f64>(x);    // error: wrong number of type arguments:
[01:16:02]   |     ^^^^^^^^^^ expected 2 type arguments
[01:16:02] error[E0308]: mismatched types
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:1889:16
[01:16:02]   |
[01:16:02]   |
[01:16:02] 6 |     foo::<f64>(x);    // error: wrong number of type arguments:
[01:16:02]   |                ^ expected f64, found bool
[01:16:02] 
[01:16:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0089::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1884)' panicked at 'Some expected error codes were not found: ["E0089"]', librustdoc/test.rs:338:9
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0107 (line 2123) stdout ----
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0107 (line 2123) stdout ----
[01:16:02] error: expected one of `.`, `;`, `?`, `}`, or an operator, found `f`
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:2129:5
[01:16:02]   |
[01:16:02] 5 |     f()                 // error: wrong number of lifetime arguments:
[01:16:02]   |        - expected one of `.`, `;`, `?`, `}`, or an operator here
[01:16:02] 6 |                         //        expected 1, found 0
[01:16:02] 7 |     f::<'static, 'b>() // error: wrong number of lifetime arguments:
[01:16:02]   |     ^ unexpected token
[01:16:02] 
[01:16:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0107 (line 2123)' panicked at 'Some expected error codes were not found: ["E0088"]', librustdoc/test.rs:338:9
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0243::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 3846) stdout ----
[01:16:02] error[E0107]: wrong number of type arguments: expected 1, found 0
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:3849:17
[01:16:02]   |
[01:16:02]   |
[01:16:02] 5 | struct Bar { x: Foo }
[01:16:02]   |                 ^^^ expected 1 type argument
[01:16:02] 
[01:16:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0243::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 3846)' panicked at 'Some expected error codes were not found: ["E0243"]', librustdoc/test.rs:338:9
[01:16:02] ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0244::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 3861) stdout ----
[01:16:02] error[E0107]: wrong number of type arguments: expected 0, found 2
[01:16:02]  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:3864:23
[01:16:02]   |
[01:16:02]   |
[01:16:02] 5 | struct Bar<S, T> { x: Foo<S, T> }
[01:16:02]   |                       ^^^^^^^^^ 2 unexpected type arguments
[01:16:02] 
[01:16:02] thread '/checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0244::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 3861)' panicked at 'Some expected error codes were not found: ["E0244"]', librustdoc/test.rs:338:9
[01:16:02] 
[01:16:02] failures:
[01:16:02]     /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0087::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1809)
[01:16:02]     /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0088::_::Note__this_error_code_is_no_longer_emitted_by_the_compiler_ (line 1826)
---
[01:16:02] 
[01:16:02] 
[01:16:02] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:16:02] Build completed unsuccessfully in 0:31:48
[01:16:02] Makefile:58: recipe for target 'check' failed
[01:16:02] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0b98a7e0
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@varkor
Copy link
Member

varkor commented Aug 23, 2018

Ah, the snippets in the diagnostics are also run by the test-suite, so you'll need to update the compile_fail error code so that it matches the new code E0107.

@rust-highfive
Copy link
Contributor

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

Click to expand the log.
[00:49:37] ....................................................................................................
[00:49:40] ....................................................................................................
[00:49:43] ...i................................................................................................
[00:49:46] ....................................................................................................
[00:49:48] ....................................................iiiiiiiii.......................................
[00:49:54] ....................................................................................................
[00:49:58] ....................................................................................................
[00:50:01] .................................i..................................................................
[00:50:04] ...................................................................................i.i..ii..........

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)

@matthew-russo
Copy link
Contributor Author

finally!

@varkor
Copy link
Member

varkor commented Aug 24, 2018

@mcr431: that's looking great! If you could just fix the typo here, it'll be good to go! (You can do the other two comments as well, but they'll have to be modified when const generics are merged anyway, so it's fine to leave them like that for now).

@matthew-russo
Copy link
Contributor Author

@varkor whoops! some commits got removed while rebasing. just made the changes again. Let me know if theres anything else

@varkor
Copy link
Member

varkor commented Aug 24, 2018

Thanks @mcr431, that all looks great to me: nice work!

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 24, 2018

📌 Commit 79afc6e has been approved by varkor

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 24, 2018
@bors
Copy link
Collaborator

bors commented Aug 25, 2018

⌛ Testing commit 79afc6e with merge 7c94ead85a820e1d887b2a95b39bc48273250f36...

@bors
Copy link
Collaborator

bors commented Aug 25, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 25, 2018
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-aux 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.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/e6/8e/129966e5ae7e14a301fe58e81b7ce6dd762745518b6e3f987fb1d1df55a1/awscli-1.16.1-py2.py3-none-any.whl (1.3MB)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/53/fe/eb019c3d0fecc26680f025af10f3f026c33b61fda6c349de931e589ffa80/botocore-1.11.1-py2.py3-none-any.whl (4.6MB)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
---
[01:50:00] Initialized empty Git repository in /checkout/obj/build/ct/xsv/.git/
[01:50:00] fatal: Could not parse object '66956b6bfd62d6ac767a6b6499c982eae20a2c9f'.
[01:50:21] fatal: unable to access 'https://github.com/BurntSushi/xsv/': Could not resolve host: github.com
[01:50:21] 
[01:50:21] thread 'main' panicked at 'assertion failed: status.success()', tools/cargotest/main.rs:128:13
[01:50:21] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:50:21] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/cargotest" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/ct"
[01:50:21] expected success, got: exit code: 101
[01:50:21] 
[01:50:21] 
[01:50:21] 
[01:50:21] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:50:21] Build completed unsuccessfully in 0:46:02
[01:50:21] make: *** [check-aux] Error 1
[01:50:21] Makefile:60: recipe for target 'check-aux' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:329a0004
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:0702d596:start=1535179036669494495,finish=1535179036677628746,duration=8134251
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:293ffe24
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:017d918c
travis_time:start:017d918c
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:08f5eec6
$ 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)

@kennytm
Copy link
Member

kennytm commented Aug 25, 2018

@bors retry travis-ci/travis-ci#9696

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 25, 2018
@bors
Copy link
Collaborator

bors commented Aug 25, 2018

⌛ Testing commit 79afc6e with merge 545f223...

bors added a commit that referenced this pull request Aug 25, 2018
Fix #53525  - Unify E0243, E0244, E0087, E0088, E0089, and E0090 into E0107

Fix #53525

This pr merges all errors related to too many or too few generic arguments in types and functions. E0243, E0244, E0087, E0088, E0089, E0090 errors will no longer be emitted and E0107 will be used instead.
@bors
Copy link
Collaborator

bors commented Aug 25, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: varkor
Pushing 545f223 to master...

@bors bors merged commit 79afc6e into rust-lang:master Aug 25, 2018
@matthew-russo matthew-russo deleted the Fix-#53525 branch August 26, 2018 12:59
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