Skip to content

[do not merge] Test parallel queries #56765

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

Closed
wants to merge 3 commits into from
Closed

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Dec 13, 2018

Let's see if I have more luck

r? @michaelwoerister

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2018
@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 13, 2018

@bors try

@bors
Copy link
Collaborator

bors commented Dec 13, 2018

⌛ Trying commit 0e76967 with merge 2d8164662e3f939d63469888bc4d6ed57fa8a8bc...

@michaelwoerister
Copy link
Member

I was able to do a local perf.rlo run last we week. I'll post the results here if this doesn't succeed.

@bors
Copy link
Collaborator

bors commented Dec 13, 2018

💔 Test failed - status-travis

@rust-highfive

This comment has been minimized.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 13, 2018
@michaelwoerister
Copy link
Member

@bors retry

@bors
Copy link
Collaborator

bors commented Dec 13, 2018

⌛ Trying commit 0e76967 with merge b98d215...

bors added a commit that referenced this pull request Dec 13, 2018
[do not merge] Test parallel queries

Let's see if I have more luck

r? @michaelwoerister
@bors
Copy link
Collaborator

bors commented Dec 13, 2018

💔 Test failed - status-travis

@rust-highfive

This comment has been minimized.

@rust-highfive

This comment has been minimized.

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 13, 2018

@bors try

@bors
Copy link
Collaborator

bors commented Dec 13, 2018

⌛ Trying commit 435a68446759a648b0225d10bd45ecf646ea32a8 with merge 83824a5cd486f61d87acc3bbe0a05601de2e4d4b...

@bors
Copy link
Collaborator

bors commented Dec 13, 2018

💔 Test failed - status-travis

@rust-highfive

This comment has been minimized.

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 13, 2018

@bors try

@bors
Copy link
Collaborator

bors commented Dec 13, 2018

⌛ Trying commit 16d6920 with merge 4c48bb457450129a1852f945ac7a254d2b91fef8...

@rust-highfive

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Dec 13, 2018

💔 Test failed - status-travis

@rust-highfive

This comment has been minimized.

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 13, 2018

@bors try

@rust-highfive
Copy link
Contributor

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

Click to expand the log.
travis_time:end:11f388fe:start=1545559513229234884,finish=1545559515397789051,duration=2168554167
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:00:39] Successfully built cdc5aa7f2956
[00:00:39] Successfully tagged rust-ci:latest
[00:00:39] Built container sha256:cdc5aa7f2956d3087243778f8146464eb02368034cd1536fc5e0f38a020e877f
[00:00:39] Uploading finished image to s3://rust-lang-ci-sccache2/docker/edb4b0c182cd03fb6cb15ee5994e47ebf5e2bcbda67b08b896aeaed85b4803bd22dc752096b5ed6913438390dc397259347c24173ab37bafa134d42f055fc78d
[00:01:23] upload failed: - to s3://rust-lang-ci-sccache2/docker/edb4b0c182cd03fb6cb15ee5994e47ebf5e2bcbda67b08b896aeaed85b4803bd22dc752096b5ed6913438390dc397259347c24173ab37bafa134d42f055fc78d Unable to locate credentials

[00:01:24] travis_time:end:16d611c0:start=1545559534237869186,finish=1545559607362169901,duration=73124300715
[CI_JOB_NAME=x86_64-gnu-llvm-6.0]
[00:01:24] [CI_JOB_NAME=x86_64-gnu-llvm-6.0]
---
travis_time:start:test_ui
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:55:23] 
[00:55:23] running 5194 tests
[00:55:26] ............................F..................................................F.....F...F.........F 100/5194
[00:55:29] .............................................................................FF..............FF.F..F 200/5194
[00:55:32] ........FFFFFFF.........FF.F.FF...F..FFF..FFF.....F..F..F................FF...FFF...............FF.. 300/5194
[00:55:35] .F....FF....F.....FFF...F..F........F...........F..F....FF.....F................F.....F...F......... 400/5194
[00:55:39] ..................FFF.......FFF.F....F.....FF.....FF..................F.................F.......F... 500/5194
[00:55:42] ............FF................i........FF...F...F................................................... 600/5194
[00:55:46] ..................................F.......F.........................................F............... 700/5194
[00:55:52] ...................................F............F...............F....F.....F...FFF...FFF..........FF 800/5194
[00:55:57] ........i...............i.......................F...F.........................FFFF.................. 900/5194
[00:56:00] .F..F...........F..F.............iiiii.............F...........................F.................... 1000/5194
[00:56:04] .....................................................F.............................................. 1100/5194
[00:56:06] ..............................................................F................F.................... 1200/5194
[00:56:09] .................................................................................................... 1300/5194
[00:56:12] ......................F............................................................................. 1400/5194
[00:56:14] ............F....................................................................................... 1500/5194
[00:56:17] .................................i.........................F.F...............................F...... 1600/5194
[00:56:21] F.i............................................FF................................................... 1700/5194
[00:56:24] ......................................................F............................................. 1800/5194
[00:56:28] .....................F.....................................................................F........ 1900/5194
[00:56:31] .............................................i...........................F.F....F....F.............. 2000/5194
[00:56:35] .....................F.............................................................................. 2100/5194
[00:56:39] ...........................F........................................................................ 2200/5194
[00:56:43] F...................................................................................F............... 2300/5194
[00:56:48] .................................................................................................... 2400/5194
[00:56:51] .....F.............................................................................................. 2500/5194
[00:56:55] .......................................F.................................F.......................... 2600/5194
[00:57:00] ........................FF............F................................F.....................F...... 2700/5194
[00:57:04] ...........................................................F.............................F.......... 2800/5194
[00:57:07] FF..............................................................................F.F..F.............. 2900/5194
[00:57:11] .......................................F......................................................F..... 3000/5194
[00:57:14] .F......F........F.F...........................................................................i.... 3100/5194
[00:57:17] ........................................................................................F..........F 3200/5194
[00:57:21] ............F............F.F.......F......................ii..i..ii.................FF.............. 3300/5194
[00:57:25] .F........F..............FFFFF...................F..F...........F.....F..............F....F...F..... 3400/5194
[00:57:29] ...........F...F....FFF.........F..F....FF..........F.....FFFF..FF.F..F.F.F.F..FFFF..F.......FF...FF 3500/5194
[00:57:32] F.....FFF.F.F...............................ii.....................F.....F.......................... 3600/5194
[00:57:35] .................................................................................................... 3800/5194
[00:57:37] ..................i................................................................................. 3900/5194
[00:57:37] ..................i................................................................................. 3900/5194
[00:57:40] ...........................................F...F.................................................... 4000/5194
[00:57:50] ...F.......F.......................................F..........F................................F.... 4100/5194
[00:57:53] ..FFF.....F.F..FF....F................F....F.....F.F......F..FF......F.F.........FF................F 4200/5194
[00:57:57] ......F..F..F...........F..F.........F....F..F...............F...................................... 4300/5194
[00:58:01] .......F....................F.........................F..i.......................................... 4400/5194
[00:58:07] ..................................................................F................................. 4500/5194
[00:58:10] .................................................FF.F..F.....F.......F.................F.F....F..... 4600/5194
[00:58:13] F......F............F..F..................F............F...........F...............................F 4700/5194
[00:58:18] .F.....F...F....F..F....................................F.....................................F..... 4800/5194
[00:58:22] .....................FF.......F...........F.........F..............................................F 4900/5194
[00:58:25] .....................FF................F........F.....F............................F................ 5000/5194
[00:58:28] ...........F...F.......F.............................F..F..F...................................F.F.. 5100/5194
[00:58:30] FFFFFFF...............F..........i........................FF.........................F........
[00:58:30] 
[00:58:30] ---- [ui] ui/allocator/not-an-allocator.rs stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] 
[00:58:30] 4 LL | static A: usize = 0;
[00:58:30] 5    | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize`
[00:58:30] -    = note: required by `std::alloc::GlobalAlloc::alloc`
[00:58:30] +    = note: required by `std::alloc::GlobalAlloc::alloc_zeroed`
[00:58:30] 8 
[00:58:30] 9 error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied
[00:58:30] 9 error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied
[00:58:30] 10   --> $DIR/not-an-allocator.rs:12:1
[00:58:30] 
[00:58:30] 28 LL | static A: usize = 0;
[00:58:30] 29    | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize`
[00:58:30] -    = note: required by `std::alloc::GlobalAlloc::alloc_zeroed`
[00:58:30] +    = note: required by `std::alloc::GlobalAlloc::alloc`
[00:58:30] 32 
[00:58:30] 33 error: aborting due to 4 previous errors
[00:58:30] 33 error: aborting due to 4 previous errors
[00:58:30] 34 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/allocator/not-an-allocator/not-an-allocator.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args allocator/not-an-allocator.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/allocator/not-an-allocator.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/allocator/not-an-allocator/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/allocator/not-an-allocator/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"the trait bound `usize: std::alloc::GlobalAlloc` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/allocator/not-an-allocator.rs","byte_start":487,"byte_end":507,"line_start":12,"line_end":12,"column_start":1,"column_end":21,"is_primary":true,"text":[{"text":"static A: usize = 0;","highlight_start":1,"highlight_end":21}],"label":"the trait `std::alloc::GlobalAlloc` is not implemented for `usize`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/checkout/src/test/ui/allocator/not-an-allocator.rs","byte_start":487,"byte_end":507,"line_start":12,"line_end":12,"column_start":1,"column_end":21,"is_primary":false,"text":[{"text":"static A: usize = 0;","highlight_start":1,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"#[global_allocator]","def_site_span":null}}],"children":[{"message":"required by `std::alloc::GlobalAlloc::alloc_zeroed`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied\n  --> /checkout/src/test/ui/allocator/not-an-allocator.rs:12:1\n   |\nLL | static A: usize = 0;\n   | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize`\n   |\n   = note: required by `std::alloc::GlobalAlloc::alloc_zeroed`\n\n"}
[00:58:30] {"message":"the trait bound `usize: std::alloc::GlobalAlloc` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/allocator/not-an-allocator.rs","byte_start":487,"byte_end":507,"line_start":12,"line_end":12,"column_start":1,"column_end":21,"is_primary":true,"text":[{"text":"static A: usize = 0;","highlight_start":1,"highlight_end":21}],"label":"the trait `std::alloc::GlobalAlloc` is not implemented for `usize`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/checkout/src/test/ui/allocator/not-an-allocator.rs","byte_start":487,"byte_end":507,"line_start":12,"line_end":12,"column_start":1,"column_end":21,"is_primary":false,"text":[{"text":"static A: usize = 0;","highlight_start":1,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"#[global_allocator]","def_site_span":null}}],"children":[{"message":"required by `std::alloc::GlobalAlloc::dealloc`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied\n  --> /checkout/src/test/ui/allocator/not-an-allocator.rs:12:1\n   |\nLL | static A: usize = 0;\n   | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize`\n   |\n   = note: required by `std::alloc::GlobalAlloc::dealloc`\n\n"}
[00:58:30] {"message":"the trait bound `usize: std::alloc::GlobalAlloc` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/allocator/not-an-allocator.rs","byte_start":487,"byte_end":507,"line_start":12,"line_end":12,"column_start":1,"column_end":21,"is_primary":true,"text":[{"text":"static A: usize = 0;","highlight_start":1,"highlight_end":21}],"label":"the trait `std::alloc::GlobalAlloc` is not implemented for `usize`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/checkout/src/test/ui/allocator/not-an-allocator.rs","byte_start":487,"byte_end":507,"line_start":12,"line_end":12,"column_start":1,"column_end":21,"is_primary":false,"text":[{"text":"static A: usize = 0;","highlight_start":1,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"#[global_allocator]","def_site_span":null}}],"children":[{"message":"required by `std::alloc::GlobalAlloc::realloc`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied\n  --> /checkout/src/test/ui/allocator/not-an-allocator.rs:12:1\n   |\nLL | static A: usize = 0;\n   | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize`\n   |\n   = note: required by `std::alloc::GlobalAlloc::realloc`\n\n"}
[00:58:30] {"message":"the trait bound `usize: std::alloc::GlobalAlloc` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/allocator/not-an-allocator.rs","byte_start":487,"byte_end":507,"line_start":12,"line_end":12,"column_start":1,"column_end":21,"is_primary":true,"text":[{"text":"static A: usize = 0;","highlight_start":1,"highlight_end":21}],"label":"the trait `std::alloc::GlobalAlloc` is not implemented for `usize`","suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/checkout/src/test/ui/allocator/not-an-allocator.rs","byte_start":487,"byte_end":507,"line_start":12,"line_end":12,"column_start":1,"column_end":21,"is_primary":false,"text":[{"text":"static A: usize = 0;","highlight_start":1,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"#[global_allocator]","def_site_span":null}}],"children":[{"message":"required by `std::alloc::GlobalAlloc::alloc`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `usize: std::alloc::GlobalAlloc` is not satisfied\n  --> /checkout/src/test/ui/allocator/not-an-allocator.rs:12:1\n   |\nLL | static A: usize = 0;\n   | ^^^^^^^^^^^^^^^^^^^^ the trait `std::alloc::GlobalAlloc` is not implemented for `usize`\n   |\n   = note: required by `std::alloc::GlobalAlloc::alloc`\n\n"}
[00:58:30] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:58:30] {"message":"For more information about this error, try `rustc --explain E0277`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0277`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/allocator/not-an-allocator.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:58:30] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:58:30] 
[00:58:30] ---- [ui] ui/associated-type/associated-type-projection-from-supertrait.rs stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] 1 error[E0308]: mismatched types
[00:58:30] -   --> $DIR/associated-type-projection-from-supertrait.rs:43:23
[00:58:30] -    |
[00:58:30] - LL | fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types
[00:58:30] -    |                       ^^^^ expected struct `Black`, found struct `Blue`
[00:58:30] -    = note: expected type `Black`
[00:58:30] -               found type `Blue`
[00:58:30] - 
[00:58:30] - error[E0308]: mismatched types
[00:58:30] - error[E0308]: mismatched types
[00:58:30] 11   --> $DIR/associated-type-projection-from-supertrait.rs:44:23
[00:58:30] 12    |
[00:58:30] 13 LL | fn c() { dent(ModelU, Black); } //~ ERROR mismatched types
[00:58:30] 21    |
[00:58:30] 21    |
[00:58:30] 22 LL | fn f() { ModelT.chip_paint(Blue); } //~ ERROR mismatched types
[00:58:30] 23    |                            ^^^^ expected struct `Black`, found struct `Blue`
[00:58:30] +    = note: expected type `Black`
[00:58:30] +               found type `Blue`
[00:58:30] + 
[00:58:30] + error[E0308]: mismatched types
[00:58:30] + error[E0308]: mismatched types
[00:58:30] +   --> $DIR/associated-type-projection-from-supertrait.rs:43:23
[00:58:30] +    |
[00:58:30] + LL | fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types
[00:58:30] +    |                       ^^^^ expected struct `Black`, found struct `Blue`
[00:58:30] 25    = note: expected type `Black`
[00:58:30] 26               found type `Blue`
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-type/associated-type-projection-from-supertrait/associated-type-projection-from-supertrait.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args associated-type/associated-type-projection-from-supertrait.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/associated-type/associated-type-projection-from-supertrait.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-type/associated-type-projection-from-supertrait/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-type/associated-type-projection-from-supertrait/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"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/associated-type/associated-type-projection-from-supertrait.rs","byte_start":1338,"byte_end":1343,"line_start":44,"line_end":44,"column_start":23,"column_end":28,"is_primary":true,"text":[{"text":"fn c() { dent(ModelU, Black); } //~ ERROR mismatched types","highlight_start":23,"highlight_end":28}],"label":"expected struct `Blue`, found struct `Black`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `Blue`\n   found type `Black`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/associated-type/associated-type-projection-from-supertrait.rs:44:23\n   |\nLL | fn c() { dent(ModelU, Black); } //~ ERROR mismatched types\n   |                       ^^^^^ expected struct `Blue`, found struct `Black`\n   |\n   = note: expected type `Blue`\n              found type `Black`\n\n"}
[00:58:30] {"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/associated-type/associated-type-projection-from-supertrait.rs","byte_start":1548,"byte_end":1552,"line_start":50,"line_end":50,"column_start":28,"column_end":32,"is_primary":true,"text":[{"text":"fn f() { ModelT.chip_paint(Blue); } //~ ERROR mismatched types","highlight_start":28,"highlight_end":32}],"label":"expected struct `Black`, found struct `Blue`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `Black`\n   found type `Blue`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/associated-type/associated-type-projection-from-supertrait.rs:50:28\n   |\nLL | fn f() { ModelT.chip_paint(Blue); } //~ ERROR mismatched types\n   |                            ^^^^ expected struct `Black`, found struct `Blue`\n   |\n   = note: expected type `Black`\n              found type `Blue`\n\n"}
[00:58:30] {"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/associated-type/associated-type-projection-from-supertrait.rs","byte_start":1280,"byte_end":1284,"line_start":43,"line_end":43,"column_start":23,"column_end":27,"is_primary":true,"text":[{"text":"fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types","highlight_start":23,"highlight_end":27}],"label":"expected struct `Black`, found struct `Blue`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `Black`\n   found type `Blue`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/associated-type/associated-type-projection-from-supertrait.rs:43:23\n   |\nLL | fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types\n   |                       ^^^^ expected struct `Black`, found struct `Blue`\n   |\n   = note: expected type `Black`\n              found type `Blue`\n\n"}
[00:58:30] {"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/associated-type/associated-type-projection-from-supertrait.rs","byte_start":1611,"byte_end":1616,"line_start":51,"line_end":51,"column_start":28,"column_end":33,"is_primary":true,"text":[{"text":"fn g() { ModelU.chip_paint(Black); } //~ ERROR mismatched types","highlight_start":28,"highlight_end":33}],"label":"expected struct `Blue`, found struct `Black`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `Blue`\n   found type `Black`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/associated-type/associated-type-projection-from-supertrait.rs:51:28\n   |\nLL | fn g() { ModelU.chip_paint(Black); } //~ ERROR mismatched types\n   |                            ^^^^^ expected struct `Blue`, found struct `Black`\n   |\n   = note: expected type `Blue`\n              found type `Black`\n\n"}
[00:58:30] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:58:30] {"message":"For more information about this error, try `rustc --explain E0308`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0308`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/associated-type/associated-type-projection-from-supertrait.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] 
[00:58:30] 
[00:58:30] ---- [ui] ui/associated-types/associated-types-eq-3.rs stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] - error[E0308]: mismatched types
[00:58:30] -   --> $DIR/associated-types-eq-3.rs:33:18
[00:58:30] -    |
[00:58:30] - LL |     let _: Bar = x.boo();
[00:58:30] -    |                  ^^^^^^^ expected struct `Bar`, found associated type
[00:58:30] -    = note: expected type `Bar`
[00:58:30] -    = note: expected type `Bar`
[00:58:30] -               found type `<I as Foo>::A`
[00:58:30] - 
[00:58:30] 10 error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
[00:58:30] 12    |
[00:58:30] 
[00:58:30] 30    = note: expected type `usize`
[00:58:30] 31               found type `Bar`
[00:58:30] 31               found type `Bar`
[00:58:30] 32    = note: required for the cast to the object type `dyn Foo<A=Bar>`
[00:58:30] + error[E0308]: mismatched types
[00:58:30] +   --> $DIR/associated-types-eq-3.rs:33:18
[00:58:30] +    |
[00:58:30] +    |
[00:58:30] + LL |     let _: Bar = x.boo();
[00:58:30] +    |                  ^^^^^^^ expected struct `Bar`, found associated type
[00:58:30] +    = note: expected type `Bar`
[00:58:30] +    = note: expected type `Bar`
[00:58:30] +               found type `<I as Foo>::A`
[00:58:30] 34 error: aborting due to 3 previous errors
[00:58:30] 35 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/associated-types-eq-3/associated-types-eq-3.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args associated-types/associated-types-eq-3.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/associated-types/associated-types-eq-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/associated-types/associated-types-eq-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/associated-types/associated-types-eq-3/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"type mismatch resolving `<isize as Foo>::A == Bar`","code":{"code":"E0271","explanation":"\nThis is because of a type mismatch between the associated type of some\ntrait (e.g., `T::Bar`, where `T` implements `trait Quux { type Bar; }`)\nand another type `U` that is required to be equal to `T::Bar`, but is not.\nExamples follow.\n\nHere is a basic example:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n```\n\nHere is that same example again, with some explanatory comments:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n//                    ~~~~~~~~ ~~~~~~~~~~~~~~~~~~\n//                        |            |\n//         This says `foo` can         |\n//           only be used with         |\n//              some type that         |\n//         implements `Trait`.         |\n//                                     |\n//                             This says not only must\n//                             `T` be an impl of `Trait`\n//                             but also that the impl\n//                             must assign the type `u32`\n//                             to the associated type.\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n//~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//      |                             |\n// `i8` does have                     |\n// implementation                     |\n// of `Trait`...                      |\n//                     ... but it is an implementation\n//                     that assigns `&'static str` to\n//                     the associated type.\n\nfoo(3_i8);\n// Here, we invoke `foo` with an `i8`, which does not satisfy\n// the constraint `<i8 as Trait>::AssociatedType=u32`, and\n// therefore the type-checker complains with this error code.\n```\n\nTo avoid those issues, you have to make the types match correctly.\nSo we can fix the previous examples like this:\n\n```\n// Basic Example:\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType = &'static str> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n\n// For-Loop Example:\nlet vs = vec![1, 2, 3, 4];\nfor v in &vs {\n    match v {\n        &1 => {}\n        _ => {}\n    }\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-eq-3.rs","byte_start":1096,"byte_end":1100,"line_start":48,"line_end":48,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    foo1(a);","highlight_start":5,"highlight_end":9}],"label":"expected usize, found struct `Bar`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `usize`\n   found type `Bar`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `foo1`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-eq-3.rs","byte_start":736,"byte_end":764,"line_start":28,"line_end":28,"column_start":1,"column_end":29,"is_primary":true,"text":[{"text":"fn foo1<I: Foo<A=Bar>>(x: I) {","highlight_start":1,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`\n  --> /checkout/src/test/ui/associated-types/associated-types-eq-3.rs:48:5\n   |\nLL |     foo1(a);\n   |     ^^^^ expected usize, found struct `Bar`\n   |\n   = note: expected type `usize`\n              found type `Bar`\nnote: required by `foo1`\n  --> /checkout/src/test/ui/associated-types/associated-types-eq-3.rs:28:1\n   |\nLL | fn foo1<I: Foo<A=Bar>>(x: I) {\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"type mismatch resolving `<isize as Foo>::A == Bar`","code":{"code":"E0271","explanation":"\nThis is because of a type mismatch between the associated type of some\ntrait (e.g., `T::Bar`, where `T` implements `trait Quux { type Bar; }`)\nand another type `U` that is required to be equal to `T::Bar`, but is not.\nExamples follow.\n\nHere is a basic example:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n```\n\nHere is that same example again, with some explanatory comments:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n//                    ~~~~~~~~ ~~~~~~~~~~~~~~~~~~\n//                        |            |\n//         This says `foo` can         |\n//           only be used with         |\n//              some type that         |\n//         implements `Trait`.         |\n//                                     |\n//                             This says not only must\n//                             `T` be an impl of `Trait`\n//                             but also that the impl\n//                             must assign the type `u32`\n//                             to the associated type.\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n//~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//      |                             |\n// `i8` does have                     |\n// implementation                     |\n// of `Trait`...                      |\n//                     ... but it is an implementation\n//                     that assigns `&'static str` to\n//                     the associated type.\n\nfoo(3_i8);\n// Here, we invoke `foo` with an `i8`, which does not satisfy\n// the constraint `<i8 as Trait>::AssociatedType=u32`, and\n// therefore the type-checker complains with this error code.\n```\n\nTo avoid those issues, you have to make the types match correctly.\nSo we can fix the previous examples like this:\n\n```\n// Basic Example:\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType = &'static str> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n\n// For-Loop Example:\nlet vs = vec![1, 2, 3, 4];\nfor v in &vs {\n    match v {\n        &1 => {}\n        _ => {}\n    }\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-eq-3.rs","byte_start":1196,"byte_end":1198,"line_start":51,"line_end":51,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":"    baz(&a);","highlight_start":9,"highlight_end":11}],"label":"expected usize, found struct `Bar`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `usize`\n   found type `Bar`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for the cast to the object type `dyn Foo<A=Bar>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`\n  --> /checkout/src/test/ui/associated-types/associated-types-eq-3.rs:51:9\n   |\nLL |     baz(&a);\n   |         ^^ expected usize, found struct `Bar`\n   |\n   = note: expected type `usize`\n              found type `Bar`\n   = note: required for the cast to the object type `dyn Foo<A=Bar>`\n\n"}
[00:58:30] {"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/associated-types/associated-types-eq-3.rs","byte_start":837,"byte_end":844,"line_start":33,"line_end":33,"column_start":18,"column_end":25,"is_primary":true,"text":[{"text":"    let _: Bar = x.boo();","highlight_start":18,"highlight_end":25}],"label":"expected struct `Bar`, found associated type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `Bar`\n   found type `<I as Foo>::A`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/associated-types/associated-types-eq-3.rs:33:18\n   |\nLL |     let _: Bar = x.boo();\n   |                  ^^^^^^^ expected struct `Bar`, found associated type\n   |\n   = note: expected type `Bar`\n              found type `<I as Foo>::A`\n\n"}
[00:58:30] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:58:30] {"message":"Some errors occurred: E0271, E0308.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0271, E0308.\n"}
[00:58:30] {"message":"For more information about an error, try `rustc --explain E0271`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0271`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/associated-types/associated-types-eq-3.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] 
[00:58:30] 
[00:58:30] ---- [ui] ui/associated-types/associated-types-multiple-types-one-trait.rs stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] - error[E0271]: type mismatch resolving `<T as Foo>::Y == i32`
[00:58:30] -    |
[00:58:30] -    |
[00:58:30] - LL |     want_y(t); //~ ERROR type mismatch
[00:58:30] -    |     ^^^^^^ expected associated type, found i32
[00:58:30] -    |
[00:58:30] -    = note: expected type `<T as Foo>::Y`
[00:58:30] -               found type `i32`
[00:58:30] - note: required by `want_y`
[00:58:30] -    |
[00:58:30] -    |
[00:58:30] - LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
[00:58:30] - 
[00:58:30] - 
[00:58:30] 15 error[E0271]: type mismatch resolving `<T as Foo>::X == u32`
[00:58:30] 17    |
[00:58:30] 
[00:58:30] 24   --> $DIR/associated-types-multiple-types-one-trait.rs:52:1
[00:58:30] 25    |
[00:58:30] 25    |
[00:58:30] 26 LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
[00:58:30] + 
[00:58:30] + 
[00:58:30] + error[E0271]: type mismatch resolving `<T as Foo>::Y == i32`
[00:58:30] +   --> $DIR/associated-types-multiple-types-one-trait.rs:23:5
[00:58:30] +    |
[00:58:30] + LL |     want_y(t); //~ ERROR type mismatch
[00:58:30] +    |     ^^^^^^ expected associated type, found i32
[00:58:30] +    |
[00:58:30] +    = note: expected type `<T as Foo>::Y`
[00:58:30] +               found type `i32`
[00:58:30] + note: required by `want_y`
[00:58:30] +   --> $DIR/associated-types-multiple-types-one-trait.rs:54:1
[00:58:30] +    |
[00:58:30] + LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
[00:58:30] 28 
[00:58:30] 29 error: aborting due to 2 previous errors
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/associated-types-multiple-types-one-trait/associated-types-multiple-types-one-trait.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args associated-types/associated-types-multiple-types-one-trait.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/associated-types-multiple-types-one-trait/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/associated-types-multiple-types-one-trait/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"type mismatch resolving `<T as Foo>::X == u32`","code":{"code":"E0271","explanation":"\nThis is because of a type mismatch between the associated type of some\ntrait (e.g., `T::Bar`, where `T` implements `trait Quux { type Bar; }`)\nand another type `U` that is required to be equal to `T::Bar`, but is not.\nExamples follow.\n\nHere is a basic example:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n```\n\nHere is that same example again, with some explanatory comments:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n//                    ~~~~~~~~ ~~~~~~~~~~~~~~~~~~\n//                        |            |\n//         This says `foo` can         |\n//           only be used with         |\n//              some type that         |\n//         implements `Trait`.         |\n//                                     |\n//                             This says not only must\n//                             `T` be an impl of `Trait`\n//                             but also that the impl\n//                             must assign the type `u32`\n//                             to the associated type.\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n//~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//      |                             |\n// `i8` does have                     |\n// implementation                     |\n// of `Trait`...                      |\n//                     ... but it is an implementation\n//                     that assigns `&'static str` to\n//                     the associated type.\n\nfoo(3_i8);\n// Here, we invoke `foo` with an `i8`, which does not satisfy\n// the constraint `<i8 as Trait>::AssociatedType=u32`, and\n// therefore the type-checker complains with this error code.\n```\n\nTo avoid those issues, you have to make the types match correctly.\nSo we can fix the previous examples like this:\n\n```\n// Basic Example:\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType = &'static str> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n\n// For-Loop Example:\nlet vs = vec![1, 2, 3, 4];\nfor v in &vs {\n    match v {\n        &1 => {}\n        _ => {}\n    }\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs","byte_start":690,"byte_end":696,"line_start":28,"line_end":28,"column_start":5,"column_end":11,"is_primary":true,"text":[{"text":"    want_x(t); //~ ERROR type mismatch","highlight_start":5,"highlight_end":11}],"label":"expected associated type, found u32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `<T as Foo>::X`\n   found type `u32`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `want_x`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs","byte_start":997,"byte_end":1027,"line_start":52,"line_end":52,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"fn want_x<T:Foo<X=u32>>(t: &T) { }","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0271]: type mismatch resolving `<T as Foo>::X == u32`\n  --> /checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs:28:5\n   |\nLL |     want_x(t); //~ ERROR type mismatch\n   |     ^^^^^^ expected associated type, found u32\n   |\n   = note: expected type `<T as Foo>::X`\n              found type `u32`\nnote: required by `want_x`\n  --> /checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs:52:1\n   |\nLL | fn want_x<T:Foo<X=u32>>(t: &T) { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"type mismatch resolving `<T as Foo>::Y == i32`","code":{"code":"E0271","explanation":"\nThis is because of a type mismatch between the associated type of some\ntrait (e.g., `T::Bar`, where `T` implements `trait Quux { type Bar; }`)\nand another type `U` that is required to be equal to `T::Bar`, but is not.\nExamples follow.\n\nHere is a basic example:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n```\n\nHere is that same example again, with some explanatory comments:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n//                    ~~~~~~~~ ~~~~~~~~~~~~~~~~~~\n//                        |            |\n//         This says `foo` can         |\n//           only be used with         |\n//              some type that         |\n//         implements `Trait`.         |\n//                                     |\n//                             This says not only must\n//                             `T` be an impl of `Trait`\n//                             but also that the impl\n//                             must assign the type `u32`\n//                             to the associated type.\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n//~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n//      |                             |\n// `i8` does have                     |\n// implementation                     |\n// of `Trait`...                      |\n//                     ... but it is an implementation\n//                     that assigns `&'static str` to\n//                     the associated type.\n\nfoo(3_i8);\n// Here, we invoke `foo` with an `i8`, which does not satisfy\n// the constraint `<i8 as Trait>::AssociatedType=u32`, and\n// therefore the type-checker complains with this error code.\n```\n\nTo avoid those issues, you have to make the types match correctly.\nSo we can fix the previous examples like this:\n\n```\n// Basic Example:\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType = &'static str> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n\n// For-Loop Example:\nlet vs = vec![1, 2, 3, 4];\nfor v in &vs {\n    match v {\n        &1 => {}\n        _ => {}\n    }\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs","byte_start":608,"byte_end":614,"line_start":23,"line_end":23,"column_start":5,"column_end":11,"is_primary":true,"text":[{"text":"    want_y(t); //~ ERROR type mismatch","highlight_start":5,"highlight_end":11}],"label":"expected associated type, found i32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `<T as Foo>::Y`\n   found type `i32`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `want_y`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs","byte_start":1033,"byte_end":1063,"line_start":54,"line_end":54,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"fn want_y<T:Foo<Y=i32>>(t: &T) { }","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0271]: type mismatch resolving `<T as Foo>::Y == i32`\n  --> /checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs:23:5\n   |\nLL |     want_y(t); //~ ERROR type mismatch\n   |     ^^^^^^ expected associated type, found i32\n   |\n   = note: expected type `<T as Foo>::Y`\n              found type `i32`\nnote: required by `want_y`\n  --> /checkout/src/test/ui/associated-types/associated-types-multiple-types-one-trait.rs:54:1\n   |\nLL | fn want_y<T:Foo<Y=i32>>(t: &T) { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:58:30] {"message":"For more information about this error, try `rustc --explain E0271`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0271`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/associated-types/associated-types-multiple-types-one-trait.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] 
[00:58:30] 
[00:58:30] ---- [ui] ui/associated-types/associated-types-path-2.rs stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] - error[E0308]: mismatched types
[00:58:30] -   --> $DIR/associated-types-path-2.rs:29:14
[00:58:30] -    |
[00:58:30] - LL |     f1(2i32, 4i32);
[00:58:30] - 
[00:58:30] - 
[00:58:30] 7 error[E0277]: the trait bound `u32: Foo` is not satisfied
[00:58:30] 9    |
[00:58:30] 
[00:58:30] 45    |
[00:58:30] 45    |
[00:58:30] 46 LL |     let _: i32 = f2(2i32);
[00:58:30] 47    |                  ^^^^^^^^ expected i32, found u32
[00:58:30] + error[E0308]: mismatched types
[00:58:30] +   --> $DIR/associated-types-path-2.rs:29:14
[00:58:30] +    |
[00:58:30] +    |
[00:58:30] + LL |     f1(2i32, 4i32);
[00:58:30] 48 
[00:58:30] 49 error: aborting due to 6 previous errors
[00:58:30] 50 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/associated-types/associated-types-path-2/associated-types-path-2.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args associated-types/associated-types-path-2.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/associated-types/associated-types-path-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/associated-types/associated-types-path-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/associated-types/associated-types-path-2/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"the trait bound `u32: Foo` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-path-2.rs","byte_start":903,"byte_end":905,"line_start":39,"line_end":39,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"    f1(2u32, 4u32);","highlight_start":5,"highlight_end":7}],"label":"the trait `Foo` is not implemented for `u32`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"required by `f1`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-path-2.rs","byte_start":632,"byte_end":664,"line_start":23,"line_end":23,"column_start":1,"column_end":33,"is_primary":true,"text":[{"text":"pub fn f1<T: Foo>(a: T, x: T::A) {}","highlight_start":1,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `u32: Foo` is not satisfied\n  --> /checkout/src/test/ui/associated-types/associated-types-path-2.rs:39:5\n   |\nLL |     f1(2u32, 4u32);\n   |     ^^ the trait `Foo` is not implemented for `u32`\n   |\nnote: required by `f1`\n  --> /checkout/src/test/ui/associated-types/associated-types-path-2.rs:23:1\n   |\nLL | pub fn f1<T: Foo>(a: T, x: T::A) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"the trait bound `u32: Foo` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-path-2.rs","byte_start":903,"byte_end":917,"line_start":39,"line_end":39,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"    f1(2u32, 4u32);","highlight_start":5,"highlight_end":19}],"label":"the trait `Foo` is not implemented for `u32`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0277]: the trait bound `u32: Foo` is not satisfied\n  --> /checkout/src/test/ui/associated-types/associated-types-path-2.rs:39:5\n   |\nLL |     f1(2u32, 4u32);\n   |     ^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u32`\n\n"}
[00:58:30] {"message":"the trait bound `u32: Foo` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-path-2.rs","byte_start":1035,"byte_end":1037,"line_start":45,"line_end":45,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"    f1(2u32, 4i32);","highlight_start":5,"highlight_end":7}],"label":"the trait `Foo` is not implemented for `u32`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"required by `f1`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-path-2.rs","byte_start":632,"byte_end":664,"line_start":23,"line_end":23,"column_start":1,"column_end":33,"is_primary":true,"text":[{"text":"pub fn f1<T: Foo>(a: T, x: T::A) {}","highlight_start":1,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `u32: Foo` is not satisfied\n  --> /checkout/src/test/ui/associated-types/associated-types-path-2.rs:45:5\n   |\nLL |     f1(2u32, 4i32);\n   |     ^^ the trait `Foo` is not implemented for `u32`\n   |\nnote: required by `f1`\n  --> /checkout/src/test/ui/associated-types/associated-types-path-2.rs:23:1\n   |\nLL | pub fn f1<T: Foo>(a: T, x: T::A) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"the trait bound `u32: Foo` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/associated-types/associated-types-path-2.rs","byte_start":1035,"byte_end":1049,"line_start":45,"line_end":45,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"    f1(2u32, 4i32);","highlight_start":5,"highlight_end":19}],"label":"the trait `Foo` is not implemented for `u32`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0277]: the trait bound `u32: Foo` is not satisfied\n  --> /checkout/src/test/ui/associated-types/associated-types-path-2.rs:45:5\n   |\nLL |     f1(2u32, 4i32);\n   |     ^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `u32`\n\n"}
[00:58:30] {"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/associated-types/associated-types-path-2.rs","byte_start":1175,"byte_end":1183,"line_start":51,"line_end":51,"column_start":18,"column_end":26,"is_primary":true,"text":[{"text":"    let _: i32 = f2(2i32);","highlight_start":18,"highlight_end":26}],"label":"expected i32, found u32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/associated-types/associated-types-path-2.rs:51:18\n   |\nLL |     let _: i32 = f2(2i32);\n   |                  ^^^^^^^^ expected i32, found u32\n\n"}
[00:58:30] {"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/associated-types/associated-types-path-2.rs","byte_start":754,"byte_end":758,"line_start":29,"line_end":29,"column_start":14,"column_end":18,"is_primary":true,"text":[{"text":"    f1(2i32, 4i32);","highlight_start":14,"highlight_end":18}],"label":"expected u32, found i32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/associated-types/associated-types-path-2.rs:29:14\n   |\nLL |     f1(2i32, 4i32);\n   |              ^^^^ expected u32, found i32\n\n"}
[00:58:30] {"message":"aborting due to 6 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 6 previous errors\n\n"}
[00:58:30] {"message":"Some errors occurred: E0277, E0308.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0277, E0308.\n"}
[00:58:30] {"message":"For more information about an error, try `rustc --explain E0277`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0277`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/associated-types/associated-types-path-2.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] 
[00:58:30] 
[00:58:30] ---- [ui] ui/binop/binop-consume-args.rs stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] 1 error[E0382]: use of moved value: `lhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:47:10
[00:58:30] 3    |
[00:58:30] 3    |
[00:58:30] - LL |     lhs + rhs;
[00:58:30] + LL |     lhs & rhs;
[00:58:30] 5    |     --- value moved here
[00:58:30] 6 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 7    |          ^^^ value used here after move
[00:58:30] 
[00:58:30] 9    = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
[00:58:30] 10 
[00:58:30] 11 error[E0382]: use of moved value: `rhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:48:10
[00:58:30] 13    |
[00:58:30] 13    |
[00:58:30] - LL |     lhs + rhs;
[00:58:30] + LL |     lhs & rhs;
[00:58:30] 15    |           --- value moved here
[00:58:30] 16 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 17 LL |     drop(rhs);  //~ ERROR use of moved value: `rhs`
[00:58:30] 
[00:58:30] 20    = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
[00:58:30] 21 
[00:58:30] 22 error[E0382]: use of moved value: `lhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:53:10
[00:58:30] 24    |
[00:58:30] 24    |
[00:58:30] - LL |     lhs - rhs;
[00:58:30] + LL |     lhs | rhs;
[00:58:30] 26    |     --- value moved here
[00:58:30] 27 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 28    |          ^^^ value used here after move
[00:58:30] 29    |
[00:58:30] 29    |
[00:58:30] 30    = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
[00:58:30] 31 
[00:58:30] + error[E0382]: use of moved value: `lhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:65:10
[00:58:30] +    |
[00:58:30] + LL |     lhs << rhs;
[00:58:30] +    |     --- value moved here
[00:58:30] + LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] +    |          ^^^ value used here after move
[00:58:30] +    |
[00:58:30] +    = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
[00:58:30] + 
[00:58:30] 32 error[E0382]: use of moved value: `rhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:66:10
[00:58:30] 34    |
[00:58:30] 34    |
[00:58:30] - LL |     lhs - rhs;
[00:58:30] -    |           --- value moved here
[00:58:30] + LL |     lhs << rhs;
[00:58:30] +    |            --- value moved here
[00:58:30] 37 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 38 LL |     drop(rhs);  //~ ERROR use of moved value: `rhs`
[00:58:30] 39    |          ^^^ value used here after move
[00:58:30] 
[00:58:30] 41    = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
[00:58:30] 42 
[00:58:30] 43 error[E0382]: use of moved value: `lhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:71:10
[00:58:30] 45    |
[00:58:30] 45    |
[00:58:30] - LL |     lhs * rhs;
[00:58:30] + LL |     lhs >> rhs;
[00:58:30] 47    |     --- value moved here
[00:58:30] 48 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 49    |          ^^^ value used here after move
[00:58:30] 
[00:58:30] 51    = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
[00:58:30] 52 
[00:58:30] 53 error[E0382]: use of moved value: `rhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:72:10
[00:58:30] 55    |
[00:58:30] 55    |
[00:58:30] - LL |     lhs * rhs;
[00:58:30] -    |           --- value moved here
[00:58:30] + LL |     lhs >> rhs;
[00:58:30] +    |            --- value moved here
[00:58:30] 58 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 59 LL |     drop(rhs);  //~ ERROR use of moved value: `rhs`
[00:58:30] 60    |          ^^^ value used here after move
[00:58:30] 
[00:58:30] 62    = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
[00:58:30] 63 
[00:58:30] 64 error[E0382]: use of moved value: `lhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:59:10
[00:58:30] 66    |
[00:58:30] 66    |
[00:58:30] - LL |     lhs / rhs;
[00:58:30] + LL |     lhs ^ rhs;
[00:58:30] 68    |     --- value moved here
[00:58:30] 69 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 70    |          ^^^ value used here after move
[00:58:30] 
[00:58:30] 72    = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
[00:58:30] 73 
[00:58:30] 74 error[E0382]: use of moved value: `rhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:60:10
[00:58:30] 76    |
[00:58:30] 76    |
[00:58:30] - LL |     lhs / rhs;
[00:58:30] + LL |     lhs ^ rhs;
[00:58:30] 78    |           --- value moved here
[00:58:30] 79 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 80 LL |     drop(rhs);  //~ ERROR use of moved value: `rhs`
[00:58:30] 82    |
[00:58:30] 82    |
[00:58:30] 83    = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
[00:58:30] 84 
[00:58:30] - error[E0382]: use of moved value: `lhs`
[00:58:30] -    |
[00:58:30] -    |
[00:58:30] - LL |     lhs % rhs;
[00:58:30] -    |     --- value moved here
[00:58:30] - LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] -    |          ^^^ value used here after move
[00:58:30] -    |
[00:58:30] -    = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
[00:58:30] - 
[00:58:30] 95 error[E0382]: use of moved value: `rhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:54:10
[00:58:30] 97    |
[00:58:30] 97    |
[00:58:30] - LL |     lhs % rhs;
[00:58:30] + LL |     lhs | rhs;
[00:58:30] 99    |           --- value moved here
[00:58:30] 100 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 101 LL |     drop(rhs);  //~ ERROR use of moved value: `rhs`
[00:58:30] 
[00:58:30] 104    = note: move occurs because `rhs` has type `B`, which does not implement the `Copy` trait
[00:58:30] 105 
[00:58:30] 106 error[E0382]: use of moved value: `lhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:29:10
[00:58:30] 108    |
[00:58:30] 108    |
[00:58:30] - LL |     lhs & rhs;
[00:58:30] + LL |     lhs * rhs;
[00:58:30] 110    |     --- value moved here
[00:58:30] 111 LL |     drop(lhs);  //~ ERROR use of moved value: `lhs`
[00:58:30] 112    |          ^^^ value used here after move
[00:58:30] 
[00:58:30] 114    = note: move occurs because `lhs` has type `A`, which does not implement the `Copy` trait
[00:58:30] 115 
[00:58:30] 116 error[E0382]: use of moved value: `rhs`
[00:58:30] +   --> $DIR/binop-consume-args.rs:30:10
[00:58:30] 118    |
[00:58:30] 118    |
[00:58:30] - LL |     lhs & rhs;
[00:58:30] + LL |     lhs * rhs;
[00:58:30] 120    |           --- value moved here
---
[00:58:30] -   --> $DIR/issue-32829-2.rs:17:9
[00:58:30] + error[E0658]: statements in statics are unstable (see issue #48821)
[00:58:30] +   --> $DIR/issue-32829-2.rs:67:9
[00:58:30] 3    |
[00:58:30] 4 LL |         5;
[00:58:30] 
[00:58:30] 6    |
[00:58:30] 7    = help: add #![feature(const_let)] to the crate attributes to enable
[00:58:30] 8 
[00:58:30] 8 
[00:58:30] - error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
[00:58:30] -   --> $DIR/issue-32829-2.rs:25:9
[00:58:30] + error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
[00:58:30] +   --> $DIR/issue-32829-2.rs:75:9
[00:58:30] 11 unctions, tuple structs and tuple variants
[00:58:30] -    |
[00:58:30] -    |
[00:58:30] 72 LL |         invalid();
[00:58:30] 74 
[00:58:30] 
[00:58:30] - error[E0658]: statements in statics are unstable (see issue #48821)
[00:58:30] -   --> $DIR/issue-32829-2.rs:75:9
[00:58:30] -   --> $DIR/issue-32829-2.rs:75:9
[00:58:30] + error[E0658]: statements in constants are unstable (see issue #48821)
[00:58:30] +   --> $DIR/issue-32829-2.rs:25:9
[00:58:30] 77    |
[00:58:30] 78 LL |         invalid();
[00:58:30] 
[00:58:30] 80    |
[00:58:30] 81    = help: add #![feature(const_let)] to the crate attributes to enable
[00:58:30] 82 
[00:58:30] 82 
[00:58:30] - error[E0658]: statements in statics are unstable (see issue #48821)
[00:58:30] -   --> $DIR/issue-32829-2.rs:84:9
[00:58:30] + error[E0658]: statements in constants are unstable (see issue #48821)
[00:58:30] +   --> $DIR/issue-32829-2.rs:34:9
[00:58:30] 85    |
[00:58:30] 86 LL |         valid();
[00:58:30] 
[00:58:30] +    |
[00:58:30] +    = help: add #![feature(const_let)] to the crate attributes to enable
[00:58:30] + 
[00:58:30] + 
[00:58:30] + error[E0658]: statements in constants are unstable (see issue #48821)
[00:58:30] +   --> $DIR/issue-32829-2.rs:17:9
[00:58:30] +    |
[00:58:30] + LL |         5;
[00:58:30] 88    |
[00:58:30] 89    = help: add #![feature(const_let)] to the crate attributes to enable
[00:58:30] 90 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /stc, 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-32829-2.rs","byte_start":1502,"byte_end":1503,"line_start":67,"line_end":67,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"        5;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"add #![feature(const_let)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: statements in statics are unstable (see issue #48821)\n  --> /checkout/src/test/ui/issues/issue-32829-2.rs:67:9\n   |\nLL |         5;\n   |         ^\n   |\n   = help: add #![feature(const_let)] to the crate attributes to enable\n\n"}
[00:58:30] {"message":"calls in statics are limited to constant functions, tuple structs and tuple variants","code":{"code":"E0015","explanation":"\nThe only functions that can be called in static or constant expressions are\n`const` functions, and struct/enum constructors. `const` functions are only\navailable on a nightly compiler. Rust currently does not support more general\ncompile-time function execution.\n\n```\nconst FOO: Option<u8> = Some(1); // enum constructor\nstruct Bar {x: u8}\nconst BAR: Bar = Bar {x: 1}; // struct constructor\n```\n\nSee [RFC 911] for more details on the design of `const fn`s.\n\n[RFC 911]: https://github.com/rust-lang/rfcs/blob/master/text/0911-const-fn.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-32829-2.rs","byte_start":1624,"byte_end":1633,"line_start":75,"line_end":75,"column_start":9,"column_end":18,"is_primary":true,"text":[{"text":"        invalid();","highlight_start":9,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants\n  --> /checkout/src/test/ui/issues/issue-32829-2.rs:75:9\n   |\nLL |         invalid();\n   |         ^^^^^^^^^\n\n"}
[00:58:30] {"message":"statements in statics are unstable (see issue #48821)","code":{"code":"E0658","explanation":"\nAn unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable 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-32829-2.rs","byte_start":1624,"byte_end":1633,"line_start":75,"line_end":75,"column_start":9,"column_end":18,"is_primary":true,"text":[{"text":"        invalid();","highlight_start":9,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansiol}],"rendered":"error[E0658]: statements in statics are unstable (see issue #48821)\n  --> /checkout/src/test/ui/issues/issue-32829-2.rs:84:9\n   |\nLL |         valid();\n   |         ^^^^^^^\n   |\n   = help: add #![feature(const_let)] to the crate attributes to enable\n\n"}
[00:58:30] {"message":"statements in statics are unstable (see issue #48821)","code":{"code":"E0658","explanation":"\nAn unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable 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-32829-2.rs","byte_start":1028,"byte_end":1029,"line_start":42,"line_end":42,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"        5;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"add #![feature(const_let)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: statements in statics are unstable (see issue #48821)\n  --> /checkout/src/test/ui/issues/issue-32829-2.rs:42:9\n   |\nLL |         5;\n   |         ^\n   |\n   = help: add #![feature(const_let)] to the crate attributes to enable\n\n"}
[00:58:30] {"message":"calls in statics are limited to constant functions, tuple structs and tuple variants","code":{"code":"E0015","explanation":"\nThe only functions that can be called in static or constant expressions are\n`const` functions, and struct/enum constructors. `const` functions are only\navailable on a nightly compiler. Rust currently does not support more general\ncompile-time function execution.\n\n```\nconst FOO: Option<u8> = Some(1); // enum constructor\nstruct Bar {x: u8}\nconst BAR: Bar = Bar {x: 1}; // struct constructor\n```\n\nSee [RFC 911] for more details on the design of `const fn`s.\n\n[RFC 911]: https://github.com/rust-lang/rfcs/blob/master/text/0911-const-fn.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-32829-2.rs","byte_start":1145,"byte_end":1154,"line_start":50,"line_end":50,"column_start":9,"column_end":18,"is_primary":true,"text":[{"text":"        invalid();","highlight_start":9,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants\n  --> /checkout/src/test/ui/issues/issue-32829-2.rs:50:9\n   |\nLL |         invalid();\n   |         ^^^^^^^^^\n\n"}
[00:58:30] {"message":"statements in statics are unstable (see issue #48821)","code":{"code":"E0658","explanation":"\nAn unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E658\n#[repr(u128)] // error: use of unstablatures. 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-32829-2.rs","byte_start":1374,"byte_end":1381,"line_start":59,"line_end":59,"column_start":9,"column_end":16,"is_primary":true,"text":[{"text":"        valid();","highlight_start":9,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"add #![feature(const_let)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: statements in statics are unstable (see issue #48821)\n  --> /checkout/src/test/ui/issues/issue-32829-2.rs:59:9\n   |\nLL |         valid();\n   |         ^^^^^^^\n   |\n   = help: add #![feature(const_let)] to the crate attributes to enable\n\n"}
[00:58:30] {"message":"calls in constants are limited to constant functions, tuple structs and tuple variants","code":{"code":"E0015","explanation":"\nThe only functions that can be called in static or constant expressions are\n`const` functions, and struct/enum constructors. `const` functions are only\navailable on a nightly compiler. Rust currently does not support more general\ncompile-time function execution.\n\n```\nconst FOO: Option<u8> = Some(1); // enum constructor\nstruct Bar {x: u8}\nconst BAR: Bar = Bar {x: 1}; // struct constructor\n```\n\nSee [RFC 911] for more details on the design of `const fn`s.\n\n[RFC 911]: https://github.com/rust-lang/rfcs/blob/master/text/0911-const-fn.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-32829-2.rs","byte_start":668,"byte_end":677,"line_start":25,"line_end":25,"column_start":9,"column_end":18,"is_primary":true,"text":[{"text":"        invalid();","highlight_start":9,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants\n  --> /checkout/src/test/ui/issues/issue-32829-2.rs:25:9\n   |\nLL |         invalid();\n   |         ^^^^^^^^^\n\n"}
[00:58:30] {"message":"statements in constants are unstable (see issue #48821)","code":{"code":"E0658","explanation":"\nAn unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable 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-32829-2.rs","byte_start":668,"byte_end":677,"line_start":25,"line_end":25,"column_start":9,"column_end":18,"is_primary":true,"text":[lifetime required in the type of `y`
[00:58:30] 12    |
[00:58:30] 12    |
[00:58:30] 13 LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
[00:58:30] 
[00:58:30] 16 LL |     out.head
[00:58:30] 17    |     ^^^^^^^^ lifetime `'a` required
[00:58:30] - error: aborting due to 2 previous errors
[00:58:30] + error: aborting due to previous error
[00:58:30] 20 
[00:58:30] 21 For more information about this error, try `rustc --explain E0621`.
[00:58:30] 21 For more information about this error, try `rustc --explain E0621`.
[00:58:30] 22 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-40288-2/issue-40288-2.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args issues/issue-40288-2.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-40288-2.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-40288-2/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-40288-2/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"explicit lifetime required in the type of `y`","code":{"code":"E0621","explanation":"\nThis error code indicates a mismatch between the lifetimes appearing in the\nfunction signature (i.e., the parameter types and the return type) and the\ndata-flow found in the function body.\n\nErroneous code example:\n\n```compile_fail,E0621\nfn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { // error: explicit lifetime\n                                             //        required in the type of\n                                             //        `y`\n    if x > y { x } else { y }\n}\n```\n\nIn the code above, the function is returning data borrowed from either `x` or\n`y`, but the `'a` annotation indicates that it is returning data only from `x`.\nTo fix the error, the signature and the body must be made to match. Typically,\nthis is done by updating the function signature. So, in this case, we change\nthe type of `y` to `&'a i32`, like so:\n\n```\nfn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {\n    if x > y { x } else { y }\n}\n```\n\nNow the signature indicates that the function data borrowed from either `x` or\n`y`. Alternatively, you could change the body to not return data from `y`:\n\n```\nfn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 {\n    x\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-40288-2.rs","byte_start":1057,"byte_end":1065,"line_start":34,"line_end":34,"column_start":5,"column_end":13,"is_primary":true,"text":[{"text":"    out.hea at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] ---- [ui] ui/issues/issue-42060.rs stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] 11    |             ^ non-constant value
[00:58:30] 11    |             ^ non-constant value
[00:58:30] 12 
[00:58:30] 13 error[E0516]: `typeof` is a reserved keyword but unimplemented
[00:58:30] -    |
[00:58:30] -    |
[00:58:30] - LL |     let other: typeof(thing) = thing; //~ ERROR attempt to use a non-constant value in a constant
[00:58:30] -    |                ^^^^^^^^^^^^^ reserved keyword
[00:58:30] - 
[00:58:30] - error[E0516]: `typeof` is a reserved keyword but unimplemented
[00:58:30] 21    |
[00:58:30] 21    |
[00:58:30] 22 LL |     <typeof(q)>::N //~ ERROR attempt to use a non-constant value in a constant
[00:58:30] 23    |      ^^^^^^^^^ reserved keyword
[00:58:30] + 
[00:58:30] + 
[00:58:30] + error[E0516]: `typeof` is a reserved keyword but unimplemented
[00:58:30] +   --> $DIR/issue-42060.rs:13:16
[00:58:30] +    |
[00:58:30] + LL |     let other: typeof(thing) = thing; //~ ERROR attempt to use a non-constant value in a constant
[00:58:30] +    |                ^^^^^^^^^^^^^ reserved keyword
[00:58:30] 25 error: aborting due to 4 previous errors
[00:58:30] 26 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-42060/issue-42060.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this spectypeof(q)>::N //~ ERROR attempt to use a non-constant value in a constant\n   |             ^ non-constant value\n\n"}
[00:58:30] {"message":"`typeof` is a reserved keyword but unimplemented","code":{"code":"E0516","explanation":"\nThe `typeof` keyword is currently reserved but unimplemented.\nErroneous code example:\n\n```compile_fail,E0516\nfn main() {\n    let x: typeof(92) = 92;\n}\n```\n\nTry using type inference instead. Example:\n\n```\nfn main() {\n    let x = 92;\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-42060.rs","byte_start":700,"byte_end":709,"line_start":19,"line_end":19,"column_start":6,"column_end":15,"is_primary":true,"text":[{"text":"    <typeof(q)>::N //~ ERROR attempt to use a non-constant value in a constant","highlight_start":6,"highlight_end":15}],"label":"reserved keyword","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0516]: `typeof` is a reserved keyword but unimplemented\n  --> /checkout/src/test/ui/issues/issue-42060.rs:19:6\n   |\nLL |     <typeof(q)>::N //~ ERROR attempt to use a non-constant value in a constant\n   |      ^^^^^^^^^ reserved keyword\n\n"}
[00:58:30] {"message":"`typeof` is a reserved keyword but unimplemented","code":{"code":"E0516","explanation":"\nThe `typeof` keyword is currently reserved but unimplemented.\nErroneous code example:\n\n```compile_fail,E0516\nfn main() {\n    let x: typeof(92) = 92;\n}\n```\n\nTry using type inference instead. Example:\n\n```\nfn main() {\n    let x = 92;\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-42060.rs","byte_start":514,"byte_end":527,"line_start":13,"line_end":13,"column_start":16,"column_end":29,"is_primary":true,"text":[{"text":"    let other: typeof(thing) = thing; //~ ERROR attempt to use a non-constant value in a constant","highlight_start":16,"highlight_end":29}],"label":"reserved keyword","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0516]: `typeof` is a reserved keyword but unimplemented\n  --> /checkout/src/test/ui/issues/issue-42060.rs:13:16\n   |\nLL |     let other: typeof(thing) = thing; //~ ERROR attempt to use a non-constant value in a constant\n   |                ^^^^^^^^^^^^^ reserved keyword\n\n"}
[00:58:30] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:58:30] {"message":"Some errors occurred: E0435, E0516.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0435, E0516.\n"}
[00:58:30] {"message":"For more information about an error, try `rustc --explain E0435`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0435`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/issues/issue-42060.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] 
[00:58:30] 
[00:58:30] ---- [ui] ui/issues/issue-45199.rs#ast stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] 1 error[E0384]: cannot assign twice to immutable variable b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable
[00:58:30] 26    |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
[00:58:30] 28 error: aborting due to 3 previous errors
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-45199.ast/issue-45199.ast.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args issues/issue-45199.rs`
[00:58:30] 
[00:58:30] error in revision `ast`: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-45199.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "ast" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-45199.ast/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-45199.ast/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"cannot assign twice to immutable variable `b`","code":{"code":"E0384","explanation":"\nThis error occurs when an a |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable\n\n"}
[00:58:30] {"message":"cannot assign twice to immutable variable `b`","code":{"code":"E0384","explanation":"\nThis error occurs when an attempt is made to reassign an immutable variable.\nFor example:\n\n```compile_fail,E0384\nfn main() {\n    let x = 3;\n    x = 5; // error, reassignment of immutable variable\n}\n```\n\nBy default, variables in Rust are immutable. To fix this error, add the keyword\n`mut` after the keyword `let` when declaring the variable. For example:\n\n```\nfn main() {\n    let mut x = 3;\n    x = 5;\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-45199.rs","byte_start":1340,"byte_end":1355,"line_start":31,"line_end":31,"column_start":5,"column_end":20,"is_primary":true,"text":[{"text":"    b = Box::new(2);        //[ast]~ ERROR cannot assign twice to immutable variable","highlight_start":5,"highlight_end":20}],"label":"cannot assign twice to immutable variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-45199.rs","byte_start":1101,"byte_end":1102,"line_start":27,"line_end":27,"column_start":9,"column_end":10,"is_primary":false,"text":[{"text":"    let b = Box::new(1);    //[ast]~ NOTE first assignment","highlight_start":9,"highlight_end":10}],"label":"first assignment to `b`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0384]: cannot assign twice to immutable variable `b`\n  --> /checkout/src/test/ui/issues/issue-45199.rs:31:5\n   |\nLL |     let b = Box::new(1);    //[ast]~ NOTE first assignment\n   |         - first assignment to `b`\n...\nLL |     b = Box::new(2);        //[ast]~ ERROR cannot assign twice to immutable variable\n   |     ^^^^^^^^^^^^^^^ cannot assign twice to immutable variable\n\n"}
[00:58:30] {"message":"cannot assign twice to immutable variable `b`","code":{"code":"E0384","explanation":"\nThis error occurs when an attempt is made to reassign an immutable variable.\nFor example:\n\n```compile_fail,E0384\nfn main() {\n    let x = 3;\n    x = 5; // error, reassignment of immutable variable\n}\n```\n\nBy default, variables in Rust are immutable. To fix this error, add the keyword\n`mut` after the keyword `let` when declaring the variable. For example:\n\n```\nfn main() {\n    let mut x = 3;\n    x = 5;\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-45199.rs","byte_start":766,"byte_end":781,"line_start":20,"line_end":20,"column_start":5,"column_end":20,"is_primary":true,"text":[{"text":"    b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable","highlight_start":5,"highlight_end":20}],"label":"cannot assign twice to immutable variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-45199.rs","byte_start":655,"byte_end":670,"line_start":18,"line_end":18,"column_start":5,"column_end":20,"is_primary":false,"text":[{"text":"    b = Box::new(1);    //[ast]~ NOTE first assignment","highlight_start":5,"highlight_end":20}],"label":"first assignment to `b`","suggested_replacement":null,"suggestion_applicability":nullst assignment
[00:58:30] +    |              - help: make this binding mutable: `mut b`
[00:58:30] 6 ...
[00:58:30] - LL |     b = Box::new(1);    //[ast]~ NOTE first assignment
[00:58:30] -    |     - first assignment to `b`
[00:58:30] - LL |                         //[mir]~^ NOTE first assignment
[00:58:30] - LL |     b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable
[00:58:30] -    |     ^ cannot assign twice to immutable variable
[00:58:30] + LL |     b = Box::new(2);            //[ast]~ ERROR cannot assign twice to immutable variable
[00:58:30] +    |     ^ cannot assign to immutable argument
[00:58:30] 12 
[00:58:30] 13 error[E0384]: cannot assign twice to immutable variable `b`
[00:58:30] 
[00:58:30] 
[00:58:30] 22 LL |     b = Box::new(2);        //[ast]~ ERROR cannot assign twice to immutable variable
[00:58:30] 23    |     ^ cannot assign twice to immutable variable
[00:58:30] 24 
[00:58:30] - error[E0384]: cannot assign to immutable argument `b`
[00:58:30] -   --> $DIR/issue-45199.rs:40:5
[00:58:30] + error[E0384]: cannot assign twice to immutable variable `b`
[00:58:30] +   --> $DIR/issue-45199.rs:20:5
[00:58:30] 27    |
[00:58:30] - LL | fn test_args(b: Box<i32>) {  //[ast]~ NOTE first assignment
[00:58:30] -    |              - help: make this binding mutable: `mut b`
[00:58:30] + LL |     let b: Box<isize>;
[00:58:30] +    |         - help: make this binding mutable: `mut b`
[00:58:30] 30 ...
[00:58:30] - LL |     b = Box::new(2);            //[ast]~ ERROR cannot assign twice to immutable variable
[00:58:30] -    |     ^ cannot assign to immutable argument
[00:58:30] + LL |     b = Box::new(1);    //[ast]~ NOTE first assignment
[00:58:30] +    |     - first assignment to `b`
[00:58:30] + LL |                         //[mir]~^ NOTE first assignment
[00:58:30] + LL |     b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable
[00:58:30] +    |     ^ cannot assign twice to immutable variable
[00:58:30] 34 error: aborting due to 3 previous errors
[00:58:30] 35 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-45199.mir/issue-45199.mir.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args issues/issue-45199.rs`
[00:58:30] 
[00:58:30] error in revision `mir`: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-45199.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "mir" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-45199.mir/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-45199.mir/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] ------------------------------------------
[00:58:3. For example:\n\n```\nfn main() {\n    let mut x = 3;\n    x = 5;\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-45199.rs","byte_start":655,"byte_end":656,"line_start":18,"line_end":18,"column_start":5,"column_end":6,"is_primary":false,"text":[{"text":"    b = Box::new(1);    //[ast]~ NOTE first assignment","highlight_start":5,"highlight_end":6}],"label":"first assignment to `b`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-45199.rs","byte_start":766,"byte_end":767,"line_start":20,"line_end":20,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable","highlight_start":5,"highlight_end":6}],"label":"cannot assign twice to immutable variable","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"make this binding mutable","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-45199.rs","byte_start":560,"byte_end":561,"line_start":15,"line_end":15,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    let b: Box<isize>;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":"mut b","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0384]: cannot assign twice to immutable variable `b`\n  --> /checkout/src/test/ui/issues/issue-45199.rs:20:5\n   |\nLL |     let b: Box<isize>;\n   |         - help: make this binding mutable: `mut b`\n...\nLL |     b = Box::new(1);    //[ast]~ NOTE first assignment\n   |     - first assignment to `b`\nLL |                         //[mir]~^ NOTE first assignment\nLL |     b = Box::new(2);    //[ast]~ ERROR cannot assign twice to immutable variable\n   |     ^ cannot assign twice to immutable variable\n\n"}
[00:58:30] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:58:30] {"message":"For more information about this error, try `rustc --explain E0384`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0384`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/issues/issue-45199.rs#mir' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] 
[00:58:30] 
[00:58:30] ---- [ui] ui/issues/issue-45696-scribble-on-boxed-borrow.rs#nll stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] 1 error[E0713]: borrow may still be in use when destructor runs
[00:58:30] +   --> $DIR/issue-45696-scribble-on-boxed-borrow.rs:85:5
[00:58:30] 3    |
[00:58:30] 3    |
[00:58:30] - LL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 {
[00:58:30] -    |              -- lifetime `'a` defined here
[00:58:30] - LL |     &mut *s.0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]
[00:58:30] -    |     ^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a`
[00:58:30] + LL | fn boxed_boxesive access to its `&mut`-borrowed string data.  allowing\nanother borrow of that string data (`p`), to exist across the drop of\n`s` would be a violation of the principle that `&mut`-borrows have\nexclusive, unaliased access to their referenced data.\n\nThis error can be fixed by changing `demo` so that the destructor does\nnot run while the string-data is borrowed; for example by taking `S`\nby reference:\n\n```\n#![feature(nll)]\n\npub struct S<'a> { data: &'a mut String }\n\nimpl<'a> Drop for S<'a> {\n    fn drop(&mut self) { self.data.push_str(\"being dropped\"); }\n}\n\nfn demo<'a>(s: &'a mut S<'a>) -> &'a mut String { let p = &mut *(*s).data; p }\n```\n\nNote that this approach needs a reference to S with lifetime `'a`.\nNothing shorter than `'a` will suffice: a shorter lifetime would imply\nthat after `demo` finishes executing, something else (such as the\ndestructor!) could access `s.data` after the end of that shorter\nlifetime, which would again violate the `&mut`-borrow's exclusive\naccess.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs","byte_start":3382,"byte_end":3383,"line_start":78,"line_end":78,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs","byte_start":2987,"byte_end":2989,"line_start":73,"line_end":7\n\nExample of erroneous code:\n\n```compile_fail,E0713\n#![feature(nll)]\n\npub struct S<'a> { data: &'a mut String }\n\nimpl<'a> Drop for S<'a> {\n    fn drop(&mut self) { self.data.push_str(\"being dropped\"); }\n}\n\nfn demo<'a>(s: S<'a>) -> &'a mut String { let p = &mut *s.data; p }\n```\n\nHere, `demo` tries to borrow the string data held within its\nargument `s` and then return that borrow. However, `S` is\ndeclared as implementing `Drop`.\n\nStructs implementing the `Drop` trait have an implicit destructor that\ngets called when they go out of scope. This destructor gets exclusive\naccess to the fields of the struct when it runs.\n\nThis means that when `s` reaches the end of `demo`, its destructor\ngets exclusive access to its `&mut`-borrowed string data.  allowing\nanother borrow of that string data (`p`), to exist across the drop of\n`s` would be a violation of the principle that `&mut`-borrows have\nexclusive, unaliased access to their referenced data.\n\nThis error can be fixed by changing `demo` so that the destructor does\nnot run while the string-data is borrowed; for example by taking `S`\nby reference:\n\n```\n#![feature(nll)]\n\npub struct S<'a> { data: &'a mut String }\n\nimpl<'a> Drop for S<'a> {\n    fn drop(&mut self) { self.data.push_str(\"being dropped\"); }\n}\n\nfn demo<'a>(s: &'a mut S<'a>) -> &'a mut String { let p = &mut *(*s).data; p }\n```\n\nNote that this approach needs a reference to S with lifetime `'a`.\nNothing shorter than `'a` will suffice: a shorter lifetime would imply\nthat after `demo` finishes executing, something else (such as the\ndestructor!) could access `s.data` after the end boxed-borrow.rs:63:5\n   |\nLL | fn scribbled<'a>(s: Scribble<'a>) -> &'a mut u32 {\n   |              -- lifetime `'a` defined here\nLL |     &mut *s.0 //[nll]~ ERROR borrow may still be in use when destructor runs [E0713]\n   |     ^^^^^^^^^ returning this value requires that `*s.0` is borrowed for `'a`\n...\nLL | }\n   | - here, drop of `s` needs exclusive access to `*s.0`, because the type `Scribble<'_>` implements the `Drop` trait\n\n"}
[00:58:30] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:58:30] {"message":"For more information about this error, try `rustc --explain E0713`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0713`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/issues/issue-45696-scribble-on-boxed-borrow.rs#nll' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] 
[00:58:30] 
[00:58:30] ---- [ui] ui/issues/issue-46604.rs#mir stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] - error[E0017]: references in statics may only refer to immutable values
[00:58:30] -    |
[00:58:30] -    |
[00:58:30] - LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //[ast]~ ERROR E0017
[00:58:30] -    |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values
[00:58:30] - 
[00:58:30] 7 error[E0594]: cannot assign to `buf[..]`, as `buf` is an immutable static item
[00:58:30] 9    |
[00:58:30] 
[00:58:30] 
[00:58:30] 10 LL |     buf[0]=2;                                   //[ast]~ ERROR E0389
[00:58:30] + 
[00:58:30] + 
[00:58:30] + error[E0017]: references in statics may only refer to immutable values
[00:58:30] +   --> $DIR/issue-46604.rs:14:25
[00:58:30] +    |
[00:58:30] + LL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //[ast]~ ERROR E0017
[00:58:30] +    |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values
[00:58:30] 13 error: aborting due to 2 previous errors
[00:58:30] 14 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-46604.mir/issue-46604.mir.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args issues/issue-46604.rs`
[00:58:30] 
[00:58:30] error in revision `mir`: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-46604.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "mir" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-46604.mir/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "borrowck=mir" "-L" "/checkout/obj/build/x86_64-unknownviolate memory safety since holding multiple mutable references to shared data\nis not allowed.\n\nIf you really want global mutable state, try using `static mut` or a global\n`UnsafeCell`.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-46604.rs","byte_start":552,"byte_end":572,"line_start":14,"line_end":14,"column_start":25,"column_end":45,"is_primary":true,"text":[{"text":"static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //[ast]~ ERROR E0017","highlight_start":25,"highlight_end":45}],"label":"statics require immutable values","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0017]: references in statics may only refer to immutable values\n  --> /checkout/src/test/ui/issues/issue-46604.rs:14:25\n   |\nLL | static buf: &mut [u8] = &mut [1u8,2,3,4,5,7];   //[ast]~ ERROR E0017\n   |                         ^^^^^^^^^^^^^^^^^^^^ statics require immutable values\n\n"}
[00:58:30] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:58:30] {"message":"Some errors occurred: E0017, E0594.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0017, E0594.\n"}
[00:58:30] {"message":"For more information about an error, try `rustc --explain E0017`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0017`.\n"}
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] thread '[ui] ui/issues/issue-46604.rs#mir' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[00:58:30] 
[00:58:30] 
[00:58:30] ---- [ui] ui/issues/issue-47706.rs stdout ----
[00:58:30] diff of stderr:
[00:58:30] 
[00:58:30] - error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
[00:58:30] -    |
[00:58:30] -    |
[00:58:30] - LL |     pub fn new(foo: Option<i32>, _: ()) -> Foo {
[00:58:30] -    |     ------------------------------------------ takes 2 arguments
[00:58:30] - ...
[00:58:30] - LL |         self.foo.map(Foo::new)
[00:58:30] -    |                  ^^^ expected function that takes 1 argument
[00:58:30] - 
[00:58:30] 10 error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
[00:58:30] 12    |
[00:58:30] 
[00:58:30] 
[00:58:30] 25 LL | | {
[00:58:30] 26 LL | | }
[00:58:30] + 
[00:58:30] + 
[00:58:30] + error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
[00:58:30] +   --> $DIR/issue-47706.rs:21:18
[00:58:30] +    |
[00:58:30] + LL |     pub fn new(foo: Option<i32>, _: ()) -> Foo {
[00:58:30] +    |     ------------------------------------------ takes 2 arguments
[00:58:30] + ...
[00:58:30] + LL |         self.foo.map(Foo::new)
[00:58:30] +    |                  ^^^ expected function that takes 1 argument
[00:58:30] 29 error: aborting due to 2 previous errors
[00:58:30] 30 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/uiumn_end":8,"is_primary":true,"text":[{"text":"    foo(Qux::Bar);","highlight_start":5,"highlight_end":8}],"label":"expected function that takes 0 arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-47706.rs","byte_start":779,"byte_end":787,"line_start":27,"line_end":27,"column_start":5,"column_end":13,"is_primary":false,"text":[{"text":"    Bar(i32),","highlight_start":5,"highlight_end":13}],"label":"takes 1 argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"required by `foo`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-47706.rs","byte_start":792,"byte_end":830,"line_start":30,"line_end":34,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn foo<F>(f: F)","highlight_start":1,"highlight_end":16},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    F: Fn(),","highlight_start":1,"highlight_end":13},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0593]: function is expected to take 0 arguments, but it takes 1 argument\n  --> /checkout/src/test/ui/issues/issue-47706.rs:37:5\n   |\nLL |     Bar(i32),\n   |     -------- takes 1 argument\n...\nLL |     foo(Qux::Bar);\n   |     ^^^ expected function that takes 0 arguments\n   |\nnote: required by `foo`\n  --> /checkout/src/test/ui/issues/issue-47706.rs:30:1\n   |\nLL | / fn foo<F>(f: F)\nLL | | where\nLL | |     F: Fn(),\nLL | | {\nLL | | }\n   | |_^\n\n"}
[00:58:30] {"message":"function is expected to take 1 argument, but it takes 2 arguments","code":{"code":"E0593","explanation":"\nYou tried to supply an `Fn`-based type with an incorrect number of arguments\nthan what was expected.\n\nErroneous code example:\n\n```compile_fail,E0593\nfn foo<F: Fn()>(x: F) { }\n\nfn main() {\n    // [E0593] closure takes 1 argument but 0 arguments are required\n    foo(|y| { });\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-47706.rs","byte_start":651,"byte_end":654,"line_start":21,"line_end":21,"column_start":18,"column_end":21,"is_primary":true,"text":[{"text":"        self.foo.map(Foo::new)","highlight_start":18,"highlight_end":21}],"label":"expected function that takes 1 argument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-47706.rs","byte_start":524,"byte_end":566,"line_start":16,"line_end":16,"column_start":5,"column_end":47,"is_primary":false,"text":[{"text":"    pub fn new(foo: Option<i32>, _: ()) -> Foo {","highlight_start":5,"highlight_end":47}],"label":"takes 2 arguments","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0593]: function is expected to take 1 argument, but it takes 2 arguments\n  --> /checkout/src/test/ui/issues/issue-47706.rs:21:18\n   |\nLL |     pub fn new(foo: Option<i32>, _: ()) -> Foo {\n   |     ------------------------------------------ takes 2 arguments\n...\nLL |         self.foo.map(Fo"error[E0572]: return statement outside of function body\n  --> /checkout/src/test/ui/issues/issue-51714.rs:12:14\n   |\nLL |     |_:  [_; return || {}] | {};\n   |              ^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"return statement outside of function body","code":{"code":"E0572","explanation":"\nA return statement was found outside of a function body.\n\nErroneous code example:\n\n```compile_fail,E0572\nconst FOO: u32 = return 0; // error: return statement outside of function body\n\nfn main() {}\n```\n\nTo fix this issue, just remove the return keyword or move the expression into a\nfunction. Example:\n\n```\nconst FOO: u32 = 0;\n\nfn some_fn() -> u32 {\n    return FOO;\n}\n\nfn main() {\n    some_fn();\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-51714.rs","byte_start":661,"byte_end":676,"line_start":18,"line_end":18,"column_start":10,"column_end":25,"is_primary":true,"text":[{"text":"    [(); return |ice| {}];","highlight_start":10,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0572]: return statement outside of function body\n  --> /checkout/src/test/ui/issues/issue-51714.rs:18:10\n   |\nLL |     [(); return |ice| {}];\n   |          ^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"return statement outside of function body","code":{"code":"E0572","explanation":"\nA return statement was found outside of a function body.\n\nErroneous code example:\n\n```compile_fail,E0572\nconst FOO: u32 = return 0; // error: return statement outside of function body\n\nfn main() {}\n```\n\nTo fix this issue, just remove the return keyword or move the expression into a\nfunction. Example:\n\n```\nconst FOO: u32 = 0;\n\nfn some_fn() -> u32 {\n    return FOO;\n}\n\nfn main() {\n    some_fn();\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-51714.rs","byte_start":746,"byte_end":783,"line_start":21,"line_end":21,"column_start":10,"column_end":47,"is_primary":true,"text":[{"text":"    [(); return while let Some(n) = Some(0) {}];","highlight_start":10,"highlight_end":47}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0572]: return statement outside of function body\n  --> /checkout/src/test/ui/issues/issue-51714.rs:21:10\n   |\nLL |     [(); return while let Some(n) = Some(0) {}];\n   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"irrefutable while-let pattern","code":{"code":"E0165","explanation":"\nA while-let pattern attempts to match the pattern, and enters the body if the\nmatch was successful. If the match is irrefutable (when it cannot fail to\nmatch), use a regular `let`-binding inside a `loop` instead. For instance:\n\n```compile_fail,E0165\nstruct Irrefutable(i32);\nlet irr = Irrefutable(0);\n\n// This fails to compile because the match is irrefutable.\nwhile let Irrefutable(x) = irr {\n    // ...\n}\n```\n\nTry this instead:\n\n```no_run\nstruct Irrefutable(i32);\nlet irr = Irrefutable(0);\n\nloop {\n    let Irrefutable(x) = irr;\n    // ...\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-51714.rs","byte_start":763,"byte_end":770ut/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-54302-cases.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-54302-cases/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-54302-cases/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"type mismatch resolving `for<'a> <&'a u64 as Mirror>::Image == &u64`","code":{"code":"E0271","explanation":"\nThis is because of a type mismatch between the associated type of some\ntrait (e.g., `T::Bar`, where `T` implements `trait Quux { type Bar; }`)\nand another type `U` that is required to be equal to `T::Bar`, but is not.\nExamples follow.\n\nHere is a basic example:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n```\n\nHere is that same example again, with some explanatory comments:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n//                    ~~~~~~~~ ~~~~~~~~~~~~~~~~~~\n//                        |            |\n//     vel":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-54302-cases.rs","byte_start":1959,"byte_end":1988,"line_start":85,"line_end":85,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"    <u64 as RefFoo<u64>>::ref_foo(a)","highlight_start":5,"highlight_end":34}],"label":"expected bound lifetime parameter 'a, found concrete lifetime","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"required because of the requirements on the impl of `for<'a> Foo2<'_, u64>` for `&'a u64`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `for<'a> Foo<'static, u64>` for `&'a u64`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `RefFoo<u64>` for `u64`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `RefFoo::ref_foo`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-54302-cases.rs","byte_start":1423,"byte_end":1455,"line_start":61,"line_end":61,"column_start":5,"column_end":37,"is_primary":true,"text":[{"text":"    fn ref_foo(&self) -> &'static T;","highlight_start":5,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0271]: type mismatch resolving `for<'a> <&'a u64 as Mirror>::Image == &u64`\n  --> /checkout/src/test/ui/issues/issue-54302-cases.rs:85:5\n   |\nLL |     <u64 as RefFoo<u64>>::ref_foo(a)\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'a, found concrete lifetime\n   |\n   = note: required because of the requirements on the impl of `for<'a> Foo2<'_, u64>` for `&'a u64`\n   = note: required because of the requirements on the impl of `for<'a> Foo<'static, u64>` for `&'a u64`\n   = note: required because of the requirements on the impl of `RefFoo<u64>` for `u64`\nnote: required by `RefFoo::ref_foo`\n  --> /checkout/src/test/ui/issues/issue-54302-cases.rs:61:5\n   |\nLL |     fn ref_foo(&self) -> &'static T;\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"type mismatch resolving `for<'a> <&'a i64 as Mirror>::Image == &i64`","code":{"code":"E0271","explanation":"\nThis is because of a type mismatch between the associated type of some\ntrait (e.g., `T::Bar`, where `T` implements `trait Quux { type Bar; }`)\nand another type `U` that is required to be equal to `T::Bar`, but is not.\nExamples follow.\n\nHere is a basic example:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n    println!(\"in foo\");\n}\n\nimpl Trait for i8 { type AssociatedType = &'static str; }\n\nfoo(3_i8);\n```\n\nHere is that same example again, with some explanatory comments:\n\n```compile_fail,E0271\ntrait Trait { type AssociatedType; }\n\nfn foo<T>(t: T) where T: Trait<AssociatedType=u32> {\n//                    ~~~~~~~~ ~~~~~~~~~~~~~~~~~~\n//                        |            |\n//         This says `foo` can         |\n//           only be used with         |\n//              some type that         |\n//         impl91,"line_end":91,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"    <i64 as RefFoo<i64>>::ref_foo(a)","highlight_start":5,"highlight_end":34}],"label":"expected bound lifetime parameter 'a, found concrete lifetime","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"required because of the requirements on the impl of `for<'a> Foo2<'_, i64>` for `&'a i64`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `for<'a> Foo<'static, i64>` for `&'a i64`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `RefFoo<i64>` for `i64`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `RefFoo::ref_foo`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-54302-cases.rs","byte_start":1423,"byte_end":1455,"line_start":61,"line_end":61,"column_start":5,"column_end":37,"is_primary":true,"text":[{"text":"    fn ref_foo(&self) -> &'static T;","highlight_start":5,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0271]: type mismatch resolving `for<'a> <&'a i64 as Mirror>::Image == &i64`\n  --> /checkout/src/test/ui/issues/issue-54302-cases.rs:91:5\n   |\nLL |     <i64 as RefFoo<i64>>::ref_foo(a)\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'a, found concrete lifetime\n   |\n   = note: required because of the requirements on the impl of `for<'a> Foo2<'_, i64>` for `&'a i64`\n   = note: required because of the requirements on the impl of `for<'a> Foo<'static, i64>` for `&'a i64`\n   = note: required because of the requirements on the impl of `RefFoo<i64>` for `i64`\nnote: required by `RefFoo::ref_foo`\n  --> /checkout/src/test/ui/issues/issue-54302-cases.rs:61:5\n   |\nLL |     fn ref_foo(&self) -> &'static T;\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"the trait bound `for<'a> &'a u32: Foo2<'_, u32>` 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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look likll}],"children":[{"message":"the following implementations were found:\n  <&'x u32 as Foo2<'x, u32>>","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `for<'a> Foo<'static, u32>` for `&'a u32`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `RefFoo<u32>` for `u32`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `RefFoo::ref_foo`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-54302-cases.rs","byte_start":1423,"byte_end":1455,"line_start":61,"line_end":61,"column_start":5,"column_end":37,"is_primary":true,"text":[{"text":"    fn ref_foo(&self) -> &'static T;","highlight_start":5,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `for<'a> &'a u32: Foo2<'_, u32>` is not satisfied\n  --> /checkout/src/test/ui/issues/issue-54302-cases.rs:73:5\n   |\nLL |     <u32 as RefFoo<u32>>::ref_foo(a)\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Foo2<'_, u32>` is not implemented for `&'a u32`\n   |\n   = help: the following implementations were found:\n             <&'x u32 as Foo2<'x, u32>>\n   = note: required because of the requirements on the impl of `for<'a> Foo<'static, u32>` for `&'a u32`\n   = note: required because of the requirements on the impl of `RefFoo<u32>` for `u32`\nnote: required by `RefFoo::ref_foo`\n  --> /checkout/src/test/ui/issues/issue-54302-cases.rs:61:5\n   |\nLL |     fn ref_foo(&self) -> &'static T;\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"the requirement `for<'a> 'a : ` is not satisfied (`expected bound lifetime parameter 'a, found concrete lifetime`)","code":{"code":"E0279","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-54302-cases.rs","byte_start":1808,"byte_end":1837,"line_start":79,"line_end":79,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"    <i32 as RefFoo<i32>>::ref_foo(a)","highlight_start":5,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"required because of the requirements on the impl of `for<'a> Foo2<'_, i32>` for `&'a i32`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `for<'a> Foo<'static, i32>` for `&'a i32`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `RefFoo<i32>` for `i32`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `RefFoo::ref_foo`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-54302-cases.rs","byte_start":1423,"byte_end":1455,"line_start":61,"line_end":61,"column_start":5,"column_end":37,"is_primary":true,"text":[{"text":"    fn ref_foo(&self) -> &'static T;","highlight_start":5,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":etime bounds
[00:58:30] +   --> $DIR/issue-55796.rs:16:9
[00:58:30] 39    |
[00:58:30] - LL |         Box::new(self.in_edges(u).map(|e| e.target()))
[00:58:30] -    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:58:30] + LL |         Box::new(self.out_edges(u).map(|e| e.target()))
[00:58:30] +    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:58:30] 42    = note: but, the lifetime must be valid for the static lifetime...
[00:58:30] 43    = note: ...so that the expression is assignable:
[00:58:30] 44            expected std::boxed::Box<(dyn std::iter::Iterator<Item=<Self as Graph<'a>>::Node> + 'static)>
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-55796/issue-55796.stderr
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-55796/issue-55796.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args issues/issue-55796.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-55796.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-55796/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-55796/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"`main` function not found in crate `issue_55796`","code":{"code":"E0601","explanation":"\nNo `main` function was found in a binary crate. To fix this error, add a\n`main` function. For example:\n\n```\nfn main() {\n    // Your program will start here.\n    println!(\"Hello world!\");\n}\n```\n\nIf you don't know the basics of Rust, you can go look to the Rust Book to get\nstarted: https://doc.rust-lang.org/book/\n"},"level":"error","spans":[],"children":[{"message":"consider adding a `main` function to `/checkout/src/test/ui/issues/issue-55796.rs`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0601]: `main` function not found in crate `issue_55796`\n   |\n   = note: consider adding a `main` function to `/checkout/src/test/ui/issues/issue-55796.rs`\n\n"}
[00:58:30] {"message":"cannot infer an appropriate lifetime due to conflicting requirements","code":{"code":"E0495","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-55796.rs","byte_start":672,"byte_end":718,"line_start":21,"line_end":21,"column_start":9,"column_end":55,"is_primary":true,"text":[{"text":"        Box::new(self.in_edges(u).map(|e| e.target()))","highlight_start":9,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"first, the lifetime cannot:58:30] +    = note: did you mean to use one of the enum's variants?
[00:58:30] 22 
[00:58:30] 23 error: the `Self` constructor can only be used with tuple or unit structs
[00:58:30] +   --> $DIR/issue-56199.rs:9:17
[00:58:30] 25    |
[00:58:30] 25    |
[00:58:30] 26 LL |         let _ = Self();
[00:58:30] -    |                 ^^^^ did you mean `Self { /* fields */ }`?
[00:58:30] +    |
[00:58:30] +    |
[00:58:30] +    = note: did you mean to use one of the enum's variants?
[00:58:30] 29 error: aborting due to 4 previous errors
[00:58:30] 30 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-56199/issue-56199.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args issues/issue-56199.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-56199.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-56199/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-56199/auxiliary" "-A" "unused"
[00:58:7\n   |\nLL |         let _ = Self();\n   |                 ^^^^ did you mean `Self { /* fields */ }`?\n\n"}
[00:58:30] {"message":"the `Self` constructor can only be used with tuple or unit structs","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-56199.rs","byte_start":70,"byte_end":74,"line_start":7,"line_end":7,"column_start":17,"column_end":21,"is_primary":true,"text":[{"text":"        let _ = Self;","highlight_start":17,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"did you mean to use one of the enum's variants?","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: the `Self` constructor can only be used with tuple or unit structs\n  --> /checkout/src/test/ui/issues/issue-56199.rs:7:17\n   |\nLL |         let _ = Self;\n   |                 ^^^^\n   |\n   = note: did you mean to use one of the enum's variants?\n\n"}
[00:58:30] {"message":"the `Self` constructor can only be used with tuple or unit structs","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-56199.rs","byte_start":178,"byte_end":182,"line_start":9,"line_end":9,"column_start":17,"column_end":21,"is_primary":true,"text":[{"text":"        let _ = Self();","highlight_start":17,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"did you mean to use one of the enum's variants?","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: the `Self` cond `foo3::Foo: std::marker::Copy` is not satisfied
[00:58:30] +   --> $DIR/kindck-impl-type-params.rs:56:33
[00:58:30] 45    |
[00:58:30] - LL |     let a = &t as &Gettable<&'a isize>;
[00:58:30] -    |             ^^
[00:58:30] + LL |     let a: Box<Gettable<Foo>> = t;
[00:58:30] +    |                                 ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo`
[00:58:30] -    = note: type must satisfy the static lifetime
[00:58:30] -    = note: type must satisfy the static lifetime
[00:58:30] +    = note: required because of the requirements on the impl of `Gettable<foo3::Foo>` for `S<foo3::Foo>`
[00:58:30] +    = note: required for the cast to the object type `dyn Gettable<foo3::Foo>`
[00:58:30] 51 error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
[00:58:30] 52   --> $DIR/kindck-impl-type-params.rs:48:13
[00:58:30] 
[00:58:30] 56    |
[00:58:30] 56    |
[00:58:30] 57    = note: required because of the requirements on the impl of `Gettable<std::string::String>` for `S<std::string::String>`
[00:58:30] 58    = note: required for the cast to the object type `dyn Gettable<std::string::String>`
[00:58:30] - 
[00:58:30] - error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied
[00:58:30] -   --> $DIR/kindck-impl-type-params.rs:56:33
[00:58:30] -    |
[00:58:30] - LL |     let a: Box<Gettable<Foo>> = t;
[00:58:30] -    |                                 ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo`
[00:58:30] -    |
[00:58:30] -    = note: required because of the requirements on the impl of `Gettable<foo3::Foo>` for `S<foo3::Foo>`
[00:58:30] -    = note: required for the cast to the object type `dyn Gettable<foo3::Foo>`
[00:58:30] 69 error: aborting due to 7 previous errors
[00:58:30] 70 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/kindck/kindck-impl-type-params/kindck-impl-type-params.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args kindck/kindck-impl-type-params.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/kindck/kindck-impl-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/kindck/kindck-impl-type-params/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/kindck/kindck-impl-type-params/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"the type `&'a isize` does not fulfill the required lifetime","code":{"code":"E0477","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/his method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-impl-type-params.rs","byte_start":845,"byte_end":847,"line_start":28,"line_end":28,"column_start":13,"column_end":15,"is_primary":true,"text":[{"text":"    let a = &t as &Gettable<T>;","highlight_start":13,"highlight_end":15}],"label":"`T` cannot be sent between threads safely","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the trait `std::marker::Send` is not implemented for `T`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"consider adding a `where T: std::marker::Send` bound","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `Gettable<T>` for `S<T>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for the cast to the object type `dyn Gettable<T>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: `T` cannot be sent between threads safely\n  --> /checkout/src/test/ui/kindck/kindck-impl-type-params.rs:28:13\n   |\nLL |     let a = &t as &Gettable<T>;\n   |             ^^ `T` cannot be sent between threads safely\n   |\n   = help: the trait `std::marker::Send` is not implemented for `T`\n   = help: consider adding a `where T: std::marker::Send` bound\n   = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`\n   = note: required for the cast to the object type `dyn Gettable<T>`\n\n"}
[00:58:30] {"message":"the trait bound `T: std::marker::Copy` 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_t implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-impl-type-params.rs","byte_start":845,"byte_end":847,"line_start":28,"line_end":28,"column_start":13,"column_end":15,"is_primary":true,"text":[{"text":"    let a = &t as &Gettable<T>;","highlight_start":13,"highlight_end":15}],"label":"the trait `std::marker::Copy` is not implemented for `T`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding a `where T: std::marker::Copy` bound","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `Gettable<T>` for `S<T>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for the cast to the object type `dyn Gettable<T>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied\n  --> /checkout/src/test/ui/kindck/kindck-impl-type-params.rs:28:13\n   |\nLL |     let a = &t as &Gettable<T>;\n   |             ^^ the trait `std::marker::Copy` is not implemented for `T`\n   |\n   = help: consider adding a `where T: std::marker::Copy` bound\n   = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`\n   = note: required for the cast to the object type `dyn Gettable<T>`\n\n"}
[00:58:30] {"message":"`T` cannot be sent between threads safely","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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    //-impl-type-params.rs","byte_start":1064,"byte_end":1066,"line_start":35,"line_end":35,"column_start":27,"column_end":29,"is_primary":true,"text":[{"text":"    let a: &Gettable<T> = &t;","highlight_start":27,"highlight_end":29}],"label":"the trait `std::marker::Copy` is not implemented for `T`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding a `where T: std::marker::Copy` bound","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `Gettable<T>` for `S<T>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for the cast to the object type `dyn Gettable<T>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied\n  --> /checkout/src/test/ui/kindck/kindck-impl-type-params.rs:35:27\n   |\nLL |     let a: &Gettable<T> = &t;\n   |                           ^^ the trait `std::marker::Copy` is not implemented for `T`\n   |\n   = help: consider adding a `where T: std::marker::Copy` bound\n   = note: required because of the requirements on the impl of `Gettable<T>` for `S<T>`\n   = note: required for the cast to the object type `dyn Gettable<T>`\n\n"}
[00:58:30] {"message":"the trait bound `foo3::Foo: std::marker::Copy` 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 traibug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-impl-type-params.rs","byte_start":1629,"byte_end":1630,"line_start":56,"line_end":56,"column_start":33,"column_end":34,"is_primary":true,"text":[{"text":"    let a: Box<Gettable<Foo>> = t;","highlight_start":33,"highlight_end":34}],"label":"the trait `std::marker::Copy` is not implemented for `foo3::Foo`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"required because of the requirements on the impl of `Gettable<foo3::Foo>` for `S<foo3::Foo>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for the cast to the object type `dyn Gettable<foo3::Foo>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `foo3::Foo: std::marker::Copy` is not satisfied\n  --> /checkout/src/test/ui/kindck/kindck-impl-type-params.rs:56:33\n   |\nLL |     let a: Box<Gettable<Foo>> = t;\n   |                                 ^ the trait `std::marker::Copy` is not implemented for `foo3::Foo`\n   |\n   = note: required because of the requirements on the impl of `Gettable<foo3::Foo>` for `S<foo3::Foo>`\n   = noteinition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-impl-type-params.rs","byte_start":1405,"byte_end":1406,"line_start":48,"line_end":48,"column_start":13,"column_end":14,"is_primary":true,"text":[{"text":"    let a = t as Box<Gettable<String>>;","highlight_start":13,"highlight_end":14}],"label":"the trait `std::marker::Copy` is not implemented for `std::string::String`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"required because of the requirements on the impl of `Gettable<std::string::String>` for `S<std::string::String>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required for the cast to the object type `dyn Gettable<std::string::String>`","code":null,"level":"note","spans":[],"children":[],"rendered":n |     take_param(&x); //~ ERROR E0277
[00:58:30] -    |     ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>`
[00:58:30] -    |
[00:58:30] -    = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>`
[00:58:30] - note: required by `take_param`
[00:58:30] -   --> $DIR/kindck-inherited-copy-bound.rs:24:1
[00:58:30] -    |
[00:58:30] - LL | fn take_param<T:Foo>(foo: &T) { }
[00:58:30] - 
[00:58:30] - 
[00:58:30] 14 error[E0038]: the trait `Foo` cannot be made into an object
[00:58:30] 15   --> $DIR/kindck-inherited-copy-bound.rs:34:19
[00:58:30] 
[00:58:30] 27    |
[00:58:30] 27    |
[00:58:30] 28    = note: the trait cannot require that `Self : Sized`
[00:58:30] 29    = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Foo>` for `&std::boxed::Box<{integer}>`
[00:58:30] + 
[00:58:30] + error[E0277]: the trait bound `std::boxed::Box<{integer}>: std::marker::Copy` is not satisfied
[00:58:30] +   --> $DIR/kindck-inherited-copy-bound.rs:28:5
[00:58:30] +    |
[00:58:30] + LL |     take_param(&x); //~ ERROR E0277
[00:58:30] +    |     ^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>`
[00:58:30] +    |
[00:58:30] +    = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>`
[00:58:30] + note: required by `take_param`
[00:58:30] +   --> $DIR/kindck-inherited-copy-bound.rs:24:1
[00:58:30] +    |
[00:58:30] + LL | fn take_param<T:Foo>(foo: &T) { }
[00:58:30] 30 
[00:58:30] 31 error: aborting due to 3 previous errors
[00:58:30] 32 
[00:58:30] 
[00:58:30] 
[00:58:30] 
[00:58:30] The actual stderr differed from the expected stderr.
[00:58:30] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/kindck/kindck-inherited-copy-bound/kindck-inherited-copy-bound.stderr
[00:58:30] To update references, rerun the tests and pass the `--bless` flag
[00:58:30] To only update this specific test, also pass `--test-args kindck/kindck-inherited-copy-bound.rs`
[00:58:30] error: 1 errors occurred comparing output.
[00:58:30] status: exit code: 1
[00:58:30] status: exit code: 1
[00:58:30] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/kindck/kindck-inherited-copy-bound.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/kindck/kindck-inherited-copy-bound/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/kindck/kindck-inherited-copy-bound/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"the trait `Foo` cannot be made into an object","code":{"code":"E0038","explanation":"\nTrait objects like `Box<Trait>` can only be constructed when certain\nrequirements are satisfied  }\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 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>()`. When we have additional\ntype parameters, the number of monomorphized implementations the compiler\ngenerates does not grow drastically, since the compiler will only generate an\nimplementation if the function is 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 method\ntable. If the trait or any subtrait contain an associated constant, they cannot\nbe made into an object.\n\n```compile_fail,E0038\ntrait Foo {\n    const X: i32;\n}\n\nimpl Foo {}\n```\n\nA simple workaround is to use a helper method instead:\n\n```\ntrait Foo {\n    fn x(&self) -> i32;\n}\n```\n\n### The trait cannot use `Self` as a type parameter in the supertrait listing\n\nThis is similar to the second sub-error, but subtler. It happens in situations\nlike the following:\n\n```compile_fail\ntrait Super<A> {}\n\ntrait Trait: Super<Self> {\n}\n\nstruct Foo;\n\nimpl Super<Foo> for Foo{}\n\nimpl Trait for Foo {}\n```\n\nHere, the supertrait might have methods as follows:\n\n```\ntrait Super<A> {\n    fn get_a(&self) -> A; // note that this is object safe!\n}\n```\n\nIf the trait `Foo` was deriving from something like `Super<String>` or\n`Super<T>` (where `Foo` itself is `Foo<T>`), this is okay, because given a type\n`get_a()` will definitely return an object of that type.\n\nHowever, if it derives from `Super<Self>`, even though `Super` is object safe,\nthe method `get_a()` would return an object of unknown type when called on the\nfunction. `Self` type parameters let us make object safe traits no longer safe,\nso they are forbidden when specifying supertraits.\n\nThere's no easy fix for this, generally code will need to be refactored so that\nyou no longer need to derive from `Super<Self>`.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-inherited-copy-bound.rs","byte_start":821,"byte_end":825,"line_start":34,"line_end":34,"column_start":19,"column_end":23,"is_primary":true,"text":[{"text":"    let z = &x as &Foo;","highlight_start":19,"highlight_end":23}],"label":"the trait `Foo` cannot be made into an object","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the trait cannot require that `Self : Sized`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0038]: the trait `Foo` cannot be made into an object\n  --> /checkout/src/test/ui/kindck/kindck-inherited-copy-bound.rs:34:19\n   |\nLL |     let z = &x as &Foo;\n   |                   ^^^^ the trait `Foo` cannot be made into an object\n   |\n   = note: the trait cannot require that `Self : Sized`\n\n"}
[00:58:30] {"message":"the trait `Foo` 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\nthis error.\n\nThere are various rules:\n\n### The trait cannot require `Self: Sized`\n\nWhen `Trait` is treated as a type, the typn```\n\nIf this is not an option, consider replacing the type parameter with another\ntrait object (e.g., if `T: OtherTrait`, use `on: Box<OtherTrait>`). If the\nnumber of types you intend to feed to this method is limited, consider manually\nlisting out the methods of different types.\n\n### Method has no receiver\n\nMethods that do not take a `self` parameter can't be called since there won't be\na way to get a pointer to the method table for them.\n\n```\ntrait Foo {\n    fn foo() -> u8;\n}\n```\n\nThis could be called as `<Foo as Foo>::foo()`, which would not be able to pick\nan implementation.\n\nAdding a `Self: Sized` bound to these methods will generally make this compile.\n\n```\ntrait Foo {\n    fn foo() -> u8 where Self: Sized;\n}\n```\n\n### The trait cannot contain associated constants\n\nJust like static functions, associated constants aren't stored on the method\ntable. If the trait or any subtrait contain an associated constant, they cannot\nbe made into an object.\n\n```compile_fail,E0038\ntrait Foo {\n    const X: i32;\n}\n\nimpl Foo {}\n```\n\nA simple workaround is to use a helper method instead:\n\n```\ntrait Foo {\n    fn x(&self) -> i32;\n}\n```\n\n### The trait cannot use `Self` as a type parameter in the supertrait listing\n\nThis is similar to the second sub-error, but subtler. It happens in situations\nlike the following:\n\n```compile_fail\ntrait Super<A> {}\n\ntrait Trait: Super<Self> {\n}\n\nstruct Foo;\n\nimpl Super<Foo> for Foo{}\n\nimpl Trait for Foo {}\n```\n\nHere, the supertrait might have methods as follows:\n\n```\ntrait Super<A> {\n    fn get_a(&self) -> A; // note that this is object safe!\n}\n```\n\nIf the trait `Foo` was deriving from something like `Super<String>` or\n`Super<T>` (where `Foo` itself is `Foo<T>`), this is okay, because given a type\n`get_a()` will definitely return an object of that type.\n\nHowever, if it derives from `Super<Self>`, even though `Super` is object safe,\nthe method `get_a()` would return an object of unknown type when called on the\nfunction. `Self` type parameters let us make object safe traits no longer safe,\nso they are forbidden when specifying supertraits.\n\nThere's no easy fix for this, generally code will need to be refactored so that\nyou no longer need to derive from `Super<Self>`.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-inherited-copy-bound.rs","byte_start":815,"byte_end":817,"line_start":34,"line_end":34,"column_start":13,"column_end":15,"is_primary":true,"text":[{"text":"    let z = &x as &Foo;","highlight_start":13,"highlight_end":15}],"label":"the trait `Foo` cannot be made into an object","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the trait cannot require that `Self : Sized`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Foo>` for `&std::boxed::Box<{integer}>`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0038]: the trait `Foo` cannot be made into an object\n  --> /checkout/src/test/ui/kindck/kindck-inherited-copy-bound.rs:34:13\n   |\nLL |     let z = &x as &Foo;\n   |             ^^ the trait `Foo` cesting" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/kindck/kindck-send-object1/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/kindck/kindck-send-object1/auxiliary" "-A" "unused"
[00:58:30] ------------------------------------------
[00:58:30] 
[00:58:30] ------------------------------------------
[00:58:30] stderr:
[00:58:30] stderr:
[00:58:30] ------------------------------------------
[00:58:30] {"message":"`(dyn Dummy + 'a)` cannot be sent between threads safely","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 implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5ily","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `assert_send`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-send-object1.rs","byte_start":659,"byte_end":691,"line_start":15,"line_end":15,"column_start":1,"column_end":33,"is_primary":true,"text":[{"text":"fn assert_send<T:Send+'static>() { }","highlight_start":1,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely\n  --> /checkout/src/test/ui/kindck/kindck-send-object1.rs:39:5\n   |\nLL |     assert_send::<Box<Dummy+'a>>();\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely\n   |\n   = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)`\n   = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>`\n   = note: required because it appears within the type `std::boi32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-send-object1.rs","byte_start":799,"byte_end":823,"line_start":20,"line_end":20,"column_start":5,"column_end":29,"is_primary":true,"text":[{"text":"    assert_send::<&'a Dummy>();","highlight_start":5,"highlight_end":29}],"label":"`(dyn Dummy + 'a)` cannot be shared between threads safely","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `assert_send`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-send-object1.rs","byte_start":659,"byte_end":691,"line_start":15,"line_end":15,"column_start":1,"column_end":33,"is_primary":true,"text":[{"text":"fn assert_send<T:Send+'static>() { }","highlight_start":1,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely\n  --> /checkout/src/test/ui/kindck/kindck-send-object1.rs:20:5\n   |\nLL |     assert_send::<&'a Dummy>();\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely\n   |\n   = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)`\n   = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)`\nnote: required by `assert_send`\n  --> /checkout/src/test/ui/kindck/kindck-send-object1.rs:15:1\n   |\nLL | fn assert_send<T:Send+'static>() { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:58:30] {"message":"the type `&'a (dyn Dummy + std::marker::Sync + 'a)` does not fulfill the required lifetime","code":{"code":"E0477","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/kindck/kindck-send-object1.rs","byte_start":933,"byte_end":964,"line_start":24,"line_end":24,"column_start":5,"column_end":36,"is_primary":true,"text":[{"text":"    assert_send::<&'a (Dummy+Sync)local-notes.rs:23:9
[00:58:30] -    |
[00:58:30] - LL |         x = 2;
[00:58:30] -    |         ----- first assignment to `x`
[00:58:30] - LL |         x = 3;      //~ ERROR (Ast) [E0384]
[00:58:30] -    |         ^^^^^ cannot assign twice to immutable variable
[00:58:30] - 
[00:58:30] - error[E0384]: cannot assign twice to immutable variable `x` (Ast)
[00:58:30] -    |
[00:58:30] -    |
[00:58:30] - LL |             x = 2;
[00:58:30] -    |             ----- first assignment to `x`
[00:58:30] - LL |             x = 3;      //~ ERROR (Ast) [E0384]
[00:58:30] -    |             ^^^^^ cannot assign twice to immutable variable
[00:58:30] - 

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)

@bors
Copy link
Collaborator

bors commented Dec 23, 2018

☀️ Test successful - status-travis
State: approved= try=True

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 23, 2018

@rust-timer build f471219

@rust-timer
Copy link
Collaborator

Success: Queued f471219 with parent ddab10a, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit f471219

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 23, 2018

@bors try

@bors
Copy link
Collaborator

bors commented Dec 23, 2018

⌛ Trying commit b78525821fb0ae940405b041c3d2a387c0856119 with merge 89874d865056c6dbdbfc37d09e0e195108cb83d7...

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 23, 2018

ctfe-stress doesn't look too good though. cc @oli-obk

@oli-obk
Copy link
Contributor

oli-obk commented Dec 23, 2018

I'm confused. Those tests look like they actually improved by 5-10% Or am I looking at the wrong link? #56765 (comment)

@jonas-schievink
Copy link
Contributor

@oli-obk The default view sorts by instructions, sort by wall-time instead and the ctfe tests get much slower

@bors
Copy link
Collaborator

bors commented Dec 23, 2018

☀️ Test successful - status-travis
State: approved= try=True

@oli-obk
Copy link
Contributor

oli-obk commented Dec 23, 2018

I would have expected incremental to be slower, as decoding large constants can happen to duplicate the work with parallel decoding and then throw away all results but the first one to finish.

I don't know why the non-incremental case is slower. It's not like we're evaluating queries twice, right? Especially weird that wall time would go down. Maybe it's just because evaluating those large constants will run a lot of queries (one or two for all the temporary locals that are written to) and I presume that a single query's evaluation time will be slower than before due to extra synchronizations?

Also note that these tests are know to fluctuate by 2-5% all the time. Maybe that fluctuation gets way worse with parallel queries?

@Zoxc
Copy link
Contributor Author

Zoxc commented Dec 24, 2018

@rust-timer build 89874d865056c6dbdbfc37d09e0e195108cb83d7

@rust-timer
Copy link
Collaborator

Success: Queued 89874d865056c6dbdbfc37d09e0e195108cb83d7 with parent ddab10a, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 89874d865056c6dbdbfc37d09e0e195108cb83d7

@Zoxc
Copy link
Contributor Author

Zoxc commented Jan 19, 2019

@bors try

@bors
Copy link
Collaborator

bors commented Jan 19, 2019

⌛ Trying commit 33610f1 with merge 18d646d...

bors added a commit that referenced this pull request Jan 19, 2019
[do not merge] Test parallel queries

Let's see if I have more luck

r? @michaelwoerister
@bors
Copy link
Collaborator

bors commented Jan 19, 2019

☀️ Test successful - checks-travis
State: approved= try=True

@Zoxc
Copy link
Contributor Author

Zoxc commented Jan 19, 2019

@rust-timer build 18d646d

@rust-timer
Copy link
Collaborator

Success: Queued 18d646d with parent f001287, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 18d646d

@TimNN TimNN added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2019
@Zoxc Zoxc closed this Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.