Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the wording #57397

Closed
wants to merge 2 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

@JohnTitor JohnTitor commented Jan 7, 2019

Fixes #55752.

This issue has two solution, to change the wording or to add the spans.
I'm not sure which is the best solution.
If you want to add the spans, I will do(but I don't know how to add the spans, please tell me).

@rust-highfive
Copy link
Collaborator

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

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

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 7, 2019
@rust-highfive
Copy link
Collaborator

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:00350199:start=1546857217186918741,finish=1546857219375027418,duration=2188108677
$ 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:57:23] .................................................................................................... 200/5300
[00:57:26] .................................................................................................... 300/5300
[00:57:29] .................................................................................................... 400/5300
[00:57:32] .................................................................................................... 500/5300
[00:57:36] ...............................i....................................FFF........F.F.FFFFF..F........F 600/5300
[00:57:39] F..............F..F....F............FFF................FFFF......................................... 700/5300
[00:57:50] .......................................................................i...............i............ 900/5300
[00:57:53] .................................................................................................iii 1000/5300
[00:57:53] .................................................................................................iii 1000/5300
[00:57:57] ii..................F............................................................................... 1100/5300
[00:57:59] ..................................................................F................................. 1200/5300
[00:58:01] ...F................................................................................................ 1300/5300
[00:58:07] .................................................................................................... 1500/5300
[00:58:09] .................................................................................................... 1600/5300
[00:58:12] ...i.........................................................................i...................... 1700/5300
[00:58:15] .................................................................................................... 1800/5300
---
[01:00:02] .................................................................................................... 4700/5300
[01:00:05] .................................................................................................... 4800/5300
[01:00:09] .................................................................................................... 4900/5300
[01:00:13] .................................................................................................... 5000/5300
[01:00:16] ............F....................................................................................... 5100/5300
[01:00:19] .................................................................................................... 5200/5300
,"explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-cow.rs","byte_start":491,"byte_end":526,"line_start":18,"line_end":18,"column_start":1,"column_end":36,"is_primary":true,"text":[{"text":"impl<T> Remote for Pair<T,Cover<T>> { }","highlight_start":1,"highlight_end":36}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-cow.rs:18:1\n   |\nLL | impl<T> Remote for Pair<T,Cover<T>> { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:00:21] {"message":"For more information about this error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-cow.rs#re_a' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:00:21] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-cow.rs#re_b stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 4 LL | impl<T> Remote for Pair<Cover<T>,T> { }
[01:00:21] 5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 6    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 8    = note: define and implement a trait or new type instead
[01:00:21] 10 error: aborting due to previous error
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-cow.re_b/coherence-cow.re_b.stderr
[01:00:21] To update references, rerun the tests and pass the `--bless` flag
[01:00:21] To only update this specific test, also pass `--test-args coherence/coherence-cow.rs`
[01:00:21] 
[01:00:21] error in revision `re_b`: 1 errors occurred comparing output.
[01:00:21] status: exit code: 1
[01:00:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-cow.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "re_b" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-cow.re_b/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/coherence/coherence-cow.re_b/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-cow.rs","byte_start":597,"byte_end":632,"line_start":23,"line_end":23,"column_start":1,"column_end":36,"is_primary":true,"text":[{"text":"impl<T> Remote for Pair<Cover<T>,T> { }","highlight_start":1,"highlight_end":36}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-cow.rs:23:1\n   |\nLL | impl<T> Remote for Pair<Cover<T>,T> { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:00:21] {"message":"For more information about this error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-cow.rs#re_b' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-cow.rs#re_c stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 4 LL | impl<T,U> Remote for Pair<Cover<T>,U> { }
[01:00:21] 5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 6    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 8    = note: define and implement a trait or new type instead
[01:00:21] 10 error: aborting due to previous error
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-cow.re_c/coherence-cow.re_c.stderr
[01:00:21] To update references, rerun the tests and pass the `--bless` flag
[01:00:21] To only update this specific test, also pass `--test-args coherence/coherence-cow.rs`
[01:00:21] 
[01:00:21] error in revision `re_c`: 1 errors occurred comparing output.
[01:00:21] status: exit code: 1
[01:00:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-cow.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "re_c" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-cow.re_c/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/coherence/coherence-cow.re_c/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-cow.rs","byte_start":703,"byte_end":740,"line_start":28,"line_end":28,"column_start":1,"column_end":38,"is_primary":true,"text":[{"text":"impl<T,U> Remote for Pair<Cover<T>,U> { }","highlight_start":1,"highlight_end":38}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-cow.rs:28:1\n   |\nLL | impl<T,U> Remote for Pair<Cover<T>,U> { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:00:21] {"message":"For more information about this error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-cow.rs#re_c' panicked at 'explicit panic'th" "-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/coherence/coherence-fundamental-trait-objects.old/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    wn-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-fundamental-trait-objects.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "re" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-fundamental-trait-objects.re/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/coherence/coherence-fundamental-trait-objects.re/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut sined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:00:21] {"message":"For more information about this error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-fundamental-trait-objects.rs#re' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-impls-send.rs#old stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 4 LL | unsafe impl Send for (MyType, MyType) {}
[01:00:21] 5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 6    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 8    = note: define and implement a trait or new type instead
[01:00:21] 9 
[01:00:21] 10 error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`
[01:00:21] 
[01:00:21] 19 LL | unsafe impl Send for [MyType] {}
[01:00:21] 20    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 21    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 23    = note: define and implement a trait or new type instead
[01:00:21] 24 
[01:00:21] 25 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 28 LL | unsafe impl Send for &'static [NotSync] {}
[01:00:21] 29    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 30    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 32    = note: define and implement a trait or new type instead
[01:00:21] 34 error: aborting due to 4 previous errors
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-impls-send.old/coherence-impls-send.old.stderr
[01:00:21] To update references, rerun the tests and pass the `--bless` flag
[01:00:21] To only update this specific test, also pass `--test-args coherence/coherence-impls-send.rs`
[01:00:21] 
[01:00:21] error in revision `old`: 1 errors occurred comparing output.
[01:00:21] status: exit code: 1
[01:00:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-impls-send.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "old" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-impls-send.old/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/coherence/coherence-impls-send.old/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-send.rs","byte_start":310,"byte_end":347,"line_start":20,"line_end":20,"column_start":1,"column_end":38,"is_primary":true,"text":[{"text":"unsafe impl Send for (MyType, MyType) {}","highlight_start":1,"highlight_end":38}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-send.rs:20:1\n   |\nLL | unsafe impl Send for (MyType, MyType) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`","code":{"code":"E0321","explanati types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-send.rs","byte_start":482,"byte_end":511,"line_start":28,"line_end":28,"column_start":1,"column_end":30,"is_primary":true,"text":[{"text":"unsafe impl Send for [MyType] {}","highlight_start":1,"highlight_end":30}],"label":"impl doesn't use types inside crate","suggete\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[01:00:21] {"message":"Some errors occurred: E0117, E0321.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0117, E0321.\n"}
[01:00:21] {"message":"For more information about an error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-impls-send.rs#old' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-impls-send.rs#re stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 4 LL | unsafe impl Send for (MyType, MyType) {}
[01:00:21] 5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 6    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 8    = note: define and implement a trait or new type instead
[01:00:21] 9 
[01:00:21] 10 error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`
[01:00:21] 
[01:00:21] 19 LL | unsafe impl Send for [MyType] {}
[01:00:21] 20  d.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "re" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-impls-send.re/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/coherence/coherence-impls-send.re/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-send.rs","byte_start":310,"byte_end":347,"line_start":20,"line_end":20,"column_start":1,"column_end":38,"is_primary":true,"text":[{"text":"unsafe impl Send for (MyType, MyType) {}","highlight_start":1,"highlight_end":38}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-send.rs:20:1\n   |\nLL | unsafe impl Send for (MyType, MyType) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`","code":{"code":"E0321","explanation":"\nA cross-crate opt-out trait was implemented on something which wasn't a struct\nor enum type. Erroneous code example:\n\n```compile_fail,E0321\n#![feature(optin_builtin_traits)]\n\nstruct Foo;\n\nimpl !Sync for Foo {}\n\nunsafe impl Send for &'static Foo {}\n// error: cross-crate traits with a default impl, like `core::marker::Send`,\n//        can only be implemented for a struct/enum type, not\n//        `&'static Foo`\n```\n\nOnly structs and enums are permitted to impl Send, Sync, and other opt-out\ntrait, and the struct or enum must be local to the current crate. So, for\nexample, `unsafe impl Send for Rc<Foo>` is not allowed.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-send.rs","byte_start":396,"byte_end":433,"line_start":24,"line_end":24,"column_start":1,"column_end":38,"is_primary":true,"text":[{"text":"unsafe impl Send for &'static NotSync {}","highlight_start":1,"highlight_end":38}],"label":"can't implement cross-crate trait with a default impl for non-struct/enum type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`\n  --> /checkout/src/test/ui/coherence/coherence-impls-send.rs:24:1\n   |\nLL | unsafe impl Send for &'static NotSync {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-send.rs","byte_start":482,"byte_end":511,"line_start":28,"line_end":28,"column_start":1,"column_end":30,"is_primary":true,"text":[{"text":"unsafe impl Send for [MyType] {}","highlight_start":1,"highlight_end":30}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-send.rs:28:1\n   |\nLL | unsafe impl Send for [MyType] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-send.rs","byte_start":560,"byte_end":599,"line_start":32,"line_end":32,"column_start":1,"column_end":40,"is_primary":true,"text":[{"text":"unsafe impl Send for &'static [NotSync] {}","highlight_start":1,"highlight_end":40}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-send.rs:32:1\n   |\nLL | unsafe impl Send for &'static [NotSync] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[01:00:21] {"message":"Some errors occurred: E0117, E0321.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0117, E0321.\n"}
[01:00:21] {"message":"For more information about an error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-impls-send.rs#re' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-impls-copy.rs#old stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 51 LL | impl Copy for i32 {}
[01:00:21] 52    | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 53    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 55    = note: define and implement a trait or new type instead
[01:00:21] 56 
[01:00:21] 57 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 60 LL | impl Copy for (MyType, MyType) {}
[01:00:21] 61    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 62    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 64    = note: define and implement a trait or new type instead
[01:00:21] 65 
[01:00:21] 66 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 69 LL | impl Copy for [MyType] {}
[01:00:21] 70    | ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 71    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 73    = note: define and implement a trait or new type instead
[01:00:21] 74 
[01:00:21] 75 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 78 LL | impl Copy for &'static [NotSync] {}
[01:00:21] 79    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 80    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 82    = note: define and implement a trait or new type instead
[01:00:21] 84 error: aborting due to 10 previous errors
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-impls-copy.old/coherence-impls-copy.old.stderr
[01:00:21] To update references, rerun the tests and pass the `--bless` flag
[01:00:21] To only update this specific test, also pass `--test-args coherence/coherence-impls-copy.rs`
[01:00:21] 
[01:00:21] error in revision `old`: 1 errors occurred comparing output.
[01:00:21] status: exit code: 1
[01:00:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-impls-copy.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "old" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-impls-copy.old/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/coherence/coherence-impls-copy.old/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"conflicting implementations of trait `std::marker::Copy` for type `i32`:","code":{"code":"E0119","explanation":"\nThere are conflicting trait implementations for the same type.\nExample of erroneous code:\n\n```compile_fail,E0119\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo {\n    value: usize\n}\n\nimpl MyTrait for Foo { // error: conflicting implementations of trait\n                       //        `MyTrait` for type `Foo`\n    fn get(&self) -> usize { self.value }\n}\n```\n\nWhen looking for the implementation for the trait, the compiler finds\nboth the `impl<T> MyTrait for T` where T is all types and the `impl\nMyTrait for Foo`. Since a trait cannot be implemented multiple times,\nthis is an error. So, when you write:\n\n```\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nThis makes the trait implemented on all types in the scope. So if you\ntry to implement it on another one after that, the implementations will\nconflict. Example:\n\n```\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo;\n\nfn main() {\n    let f = Foo;\n\n    f.get(); // the trait is implemented so we can use it\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":131,"byte_end":148,"line_start":8,"line_end":8,"column_start":1,"column_end":18,"is_primary":true,"text":[{"text":"impl Copy for i32 {}","highlight_start":1,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"conflicting implementation in crate `core`:\n- impl std::marker::Copy for i32;","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`:\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:8:1\n   |\nLL | impl Copy for i32 {}\n   | ^^^^^^^^^^^^^^^^^\n   |\n   = note: conflicting implementation in crate `core`:\n           - impl std::marker::Copy for i32;\n\n"}
[01:00:21] {"message":"conflicting implementations of trait `std::marker::Copy` for type `&NotSync`:","code":{"code":"E0119","explanation":"\nThere are conflicting trait implementations for the same type.\nExample of erroneous code:\n\n```compile_fail,E0119\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo {\n    value: usize\n}\n\nimpl MyTrait for Foo { // error: conflicting implementations of trait\n                       //        `MyTrait` for type `Foo`\n    fn get(&self) -> usize { self.value }\n}\n```\n\nWhen looking for the implementation for the trait, the compiler finds\nboth the `impl<T> MyTrait for T` where T is all types and the `impl\nMyTrait for Foo`. Since a trait cannot be implemented multiple times,\nthis is an error. So, when you write:\n\n```\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nThis makes the trait implemented on all types in the scope. So if you\ntry to implement it on another one after that, the implementations will\nconflict. Example:\n\n```\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo;\n\nfn main() {\n    let f = Foo;\n\n    f.get(); // the trait is implemented so we can use it\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":1002,"byte_end":1032,"line_start":37,"line_end":37,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"impl Copy for &'static NotSync {}","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"conflicting implementation in crate `core`:\n- impl<T> std::marker::Copy for &T\n  where T: ?Sized;","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`:\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:37:1\n   |\nLL | impl Copy for &'static NotSync {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: conflicting implementation in crate `core`:\n           - impl<T> std::marker::Copy for &T\n             where T: ?Sized;\n\n"}
[01:00:21] {"message":"conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:","code":{"code":"E0119","explanation":"\nThere are conflicting trait implementations for the same type.\nExample of erroneous code:\n\n```compile_fail,E0119\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo {\n    value: usize\n}\n\nimpl MyTrait for Foo { // error: conflicting implementations of trait\n                       //        `MyTrait` for type `Foo`\n    fn get(&self) -> usize { self.value }\n}\n```\n\nWhen looking for the implementation for the trait, the compiler finds\nboth the `impl<T> MyTrait for T` where T is all types and the `impl\nMyTrait for Foo`. Sint `Copy` may not be implemented for this type","code":{"code":"E0206","explanation":"\nYou can only implement `Copy` for a struct or enum. Both of the following\nexamples will fail, because neither `[u8; 256]` nor `&'static mut Bar`\n(mutable reference to `Bar`) is a struct or enum:\n\n```compile_fail,E0206\ntype Foo = [u8; 256];\nimpl Copy for Foo { } // error\n\n#[derive(Copy, Clone)]\nstruct Bar;\nimpl Copy for &'static mut Bar { } // error\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":582,"byte_end":601,"line_start":27,"line_end":27,"column_start":15,"column_end":34,"is_primary":true,"text":[{"text":"impl Copy for &'static mut MyType {}","highlight_start":15,"highlight_end":34}],"label":"type is not a structure or enumeration","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0206]: the trait `Copy` may not be implemented for this type\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:27:15\n   |\nLL | impl Copy for &'static mut MyType {}\n   |               ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration\n\n"}
[01:00:21] {"message":"the trait `Copy` may not be implemented for this type","code":{"code":"E0206","explanation":"\nYou can only implement `Copy` for a struct or enum. Both of the following\nexamples will fail, because neither `[u8; 256]` nor `&'static mut Bar`\n(mutable reference to `Bar`) is a struct or enum:\n\n```compile_fail,E0206\ntype Foo = [u8; 256];\nimpl Copy for Foo { } // error\n\n#[derive(Copy, Clone)]\nstruct Bar;\nimpl Copy for &'static mut 23-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":131,"byte_end":148,"line_start":8,"line_end":8,"column_start":1,"column_end":18,"is_primary":true,"text":[{"text":"impl Copy for i32 {}","highlight_start":1,"highlight_end":18}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:8:1\n   |\nLL | impl Copy for i32 {}\n   | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example ofhe current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:32:1\n   |\nLL | impl Copy for (MyType, MyType) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":1153,"byte_end":1175,"line_start":40,"line_end":40,"column_start":1,"column_end":23,"is_primary":true,"text":[{"text":"impl Copy for [MyType] {}","highlight_start":1,"highlight_end":23}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:40:1\n   |\nLL | impl Copy for [MyType] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":1389,"byte_end":1421,"line_start":45,"line_end":45,"column_start":1,"column_end":33,"is_primary":true,"text":[{"text":"impl Copy for &'static [NotSync] {}","highlight_start":1,"highlight_end":33}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:45:1\n   |\nLL | impl Copy for &'static [NotSync] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to 10 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 10 previous errors\n\n"}
[01:00:21] {"message":"Some errors occurred: E0117, E0119, E0206.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0117, E0119, E0206.\n"}
[01:00:21] {"message":"For more information about an error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-impls-copy.rs#old' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-impls-copy.rs#re stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 51 LL | impl Copy for i32 {}
[01:00:21] 52    | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 53    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 55    = note: define and implement a trait or new type instead
[01:00:21] 56 
[01:00:21] 57 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 60 LL | impl Copy for (MyType, MyType) {}
[01:00:21] 61    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 62    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 64    = note: define and implement a trait or new type instead
[01:00:21] 65 
[01:00:21] 66 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 69 LL | impl Copy for [MyType] {}
[01:00:21] 70    | ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 71    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 73    = note: define and implement a trait or new type instead
[01:00:21] 74 
[01:00:21] 75 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 78 LL | impl Copy for &'static [NotSync] {}
[01:00:21] 79    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 80    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: t"code":{"code":"E0119","explanation":"\nThere are conflicting trait implementations for the same type.\nExample of erroneous code:\n\n```compile_fail,E0119\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo {\n    value: usize\n}\n\nimpl MyTrait for Foo { // error: conflicting implementations of trait\n                       //        `MyTrait` for type `Foo`\n    fn get(&self) -> usize { self.value }\n}\n```\n\nWhen looking for the implementation for the trait, the compiler finds\nboth the `impl<T> MyTrait for T` where T is all types and the `impl\nMyTrait for Foo`. Since a trait cannot be implemented multiple times,\nthis is an error. So, when you write:\n\n```\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nThis makes the trait implemented on all types in the scope. So if you\ntry to implement it on another one after that, the implementations will\nconflict. Example:\n\n```\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo;\n\nfn main() {\n    let f = Foo;\n\n    f.get(); // the trait is implemented so we can use it\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":131,"byte_end":148,"line_start":8,"line_end":8,"column_start":1,"column_end":18,"is_primary":true,"text":[{"text":"impl Copy for i32 {}","highlight_start":1,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo;\n\nfn main() {\n    let f = Foo;\n\n    f.get(); // the trait is implemented so we can use it\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":1002,"byte_end":1032,"line_start":37,"line_end":37,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"impl Copy for &'static NotSync {}","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"conflicting implementation in crate `core`:\n- impl<T> std::marker::Copy for &T\n  where T: ?Sized;","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`:\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:37:1\n   |\nLL | impl Copy for &'static NotSync {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: conflicting implementation in crate `core`:\n           - impl<T> std::marker::Copy for &T\n             where T: ?Sized;\n\n"}
[01:00:21] {"message":"conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:","code":{"code":"E0119","explanation":"\nThere are conflicting trait implementations for the same type.\nExample of erroneous code:\n\n```compile_fail,E0119\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo {\n    value: usize\n}\n\nimpl MyTrait for Foo { // error: conflicting implementations of trait\n                       //        `MyTrait` for type `Foo`\n    fn get(&self) -> usize { self.value }\n}\n```\n\nWhen looking for the implementation for the trait, the compiler finds\nboth the `impl<T> MyTrait for T` where T is all types and the `impl\nMyTrait for Foo`. Since a trait cannot be implemented multiple times,\nthis is an error. So, when you write:\n\n```\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nThis makes the trait implemented on all types in the scope. So if you\ntry to implement it on another one after that, the implementations will\nconflict. Example:\n\n```\ntrait MyTrait {\n    fn get(&self) -> usize;\n}\n\nimpl<T> MyTrait for T {\n    fn get(&self) -> usize { 0 }\n}\n\nstruct Foo;\n\nfn main() {\n    let f = Foo;\n\n    f.get(); // the trait is implemented so we can use it\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":1389,"byte_end":1421,"line_start":45,"line_end":45,"column_start":1,"column_end":33,"is_primary":true,"text":[{"text":"impl Copy for &'static [NotSync] {}","highlight_start":1,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"conflicting implementation in crate `core`:\n- impl<T> std::marker::Copy for &T\n  where T: ?Sized;","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:45:1\n   |\nLL | impl Copy for &'static [NotSync] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: conflicting implementation in crate `core`:\n           - impl<T> std::marker::Copy for &T\n             where T: ?Sized;\n\n"}
[01:00:21] {"message":"the trait `Copy` may not be implemented for this type","code":{"code":"E0206","explanation":"\nYou can only implement `Copy` for a struct or enum. Both of the following\nexamples will fail, because neither `[u8; 256]` nor `&'static mut Bar`\n(mutable reference to `Bar`) is a struct or enum:\n\n```compile_fail,E0206\ntype Foo = [u8; 256];\nimpl Copy for Foo { } // error\n\n#[derive(Copy, Clone)]\nstruct Bar;\nimpl Copy for &'static mut Bar { } // error\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":582,"byte_end":601,"line_start":27,"line_end":27,"column_start":15,"column_end":34,"is_primary":true,"text":[{"text":"impl Copy for &'static mut MyType {}","highlight_start":15,"highlight_end":34}],"label":"type is not a structure or enumeration","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0206]: the trait `Copy` may not be implemented for this type\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:27:15\n   |\nLL | impl Copy for &'static mut MyType {}\n   |               ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration\n\n"}
[01:00:21] {"message":"the trait `Copy` may not be implemented for this type","code":{"code":"E0206","explanation":"\nYou can only implement `Copy` for a struct or enum. Both of the following\nexamples will fail, because neither `[u8; 256]` nor `&'static mut Bar`\n(mutable reference to `Bar`) is a struct or enum:\n\n```compile_fail,E0206\ntype Foo = [u8; 256];\nimpl Copy for Foo { } // error\n\n#[derive(Copy, Clone)]\nstruct Bar;\nimpl Copy for &'static mut Bar { } // error\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":772,"byte_end":788,"line_start":32,"line_end":32,"column_start":15,"column_end":31,"is_primary":true,"text":[{"text":"impl Copy for (MyType, MyType) {}","highlight_start":15,"highlight_end":31}],"label":"type is not a structure or enumeration","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0206]: the trait `Copy` may not be implemented for this type\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:32:15\n   |\nLL | impl Copy for (MyType, MyType) {}\n   |               ^^^^^^^^^^^^^^^^ type is not a structure or enumeration\n\n"}
[01:00:21] {"message":"the trait `Copy` may not be implemented for this type","code":{"code":"E0206","explanation":"\nYou can only implement `Copy` for a struct or enum. Both of the following\nexamples will fail, because neither `[u8; 256]` nor `&'static mut Bar`\n(mutable reference to `Bar`) is a struct or enum:\n\n```compile_fail,E0206\ntype Foo = [u8; 256];\nimpl Copy for Foo { } // error\n\n#[derive(Copy, Clone)]\nstruct Bar;\nimpl Copy for &'static mut Bar { } // error\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":1167,"byte_end":1175,"line_start":40,"line_end":40,"column_start":15,"column_end":23,"is_primary":true,"text":[{"text":"impl Copy for [MyType] {}","highlight_start":15,"highlight_end":23}],"label":"type is not a structure or enumeration","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0206]: the trait `Copy` may not be implemented for this type\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:40:15\n   |\nLL | impl Copy for [MyType] {}\n   |               ^^^^^^^^ type is not a structure or enumeration\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":131,"byte_end":148,"line_start":8,"line_end":8,"column_start":1,"column_end":18,"is_primary":true,"text":[{"text":"impl Copy for i32 {}","highlight_start":1,"highlight_end":18}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:8:1\n   |\nLL | impl Copy for i32 {}\n   | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":758,"byte_end":788,"line_start":32,"line_end":32,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"impl Copy for (MyType, MyType) {}","highlight_start":1,"highlight_end":31}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:32:1\n   |\nLL | impl Copy for (MyType, MyType) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your cnt crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-copy.rs","byte_start":1389,"byte_end":1421,"line_start":45,"line_end":45,"column_start":1,"column_end":33,"is_primary":true,"text":[{"text":"impl Copy for &'static [NotSync] {}","highlight_start":1,"highlight_end":33}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-copy.rs:45:1\n   |\nLL | impl Copy for &'static [NotSync] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to 10 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 10 previous errors\n\n"}
[01:00:21] {"message":"Some errors occurred: E0117, E0119, E0206.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0117, E0119, E0206.\n"}
[01:00:21] {"message":"For more information about an error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-impls-copy.rs#re' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-impls-sized.rs#old stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 40 LL | impl Sized for (MyType, MyType) {}
[01:00:21] 41    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 42    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 44    = note: define and implement a trait or new type instead
[01:00:21] 45 
[01:00:21] 46 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 49 LL | impl Sized for [MyType] {}
[01:00:21] 50    | ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 51    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 53    = note: define and implement a trait or new type instead
[01:00:21] 54 
[01:00:21] 55 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 58 LL | impl Sized for &'static [NotSync] {}
[01:00:21] 59    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 60    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 62    = note: define and implement a trait or new type instead
[01:00:21] 64 error: aborting due to 9 previous errors
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-impls-sized.old/coherence-impls-sized.old.stderr
[01:00:21] To update references, rerun the tests and pass the `--bless` flag
[01:00:21] To only update this specific test, also pass `--test-args coherence/coherence-impls-sized.rs`
[01:00:21] 
[01:00:21] error in revision `old`: 1 errors occurred comparing output.
[01:00:21] status: exit code: 1
[01:00:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-impls-sized.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "old" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-impls-sized.old/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/coherence/coherence-impls-sized.old/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"explicit impls for the `Sized` trait are not permitted","code":{"code":"E0322","explanation":"\nThe `Sized` trait is a special trait built-in to the compiler for types with a\nconstant size known at compile-time. This trait is automatically implemented\nfor types as needed by the compiler, and it is currently disallowed to\nexplicitly implement it for a type.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":210,"byte_end":230,"line_start":17,"line_end":17,"column_start":1,"column_end":21,"is_primary":true,"text":[{"text":"impl Sized for TestE {}","highlight_start":1,"highlight_end":21}],"label":"impl of 'Sized' not allowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0322]: explicit impls for the `Sized` trait are not permitted\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:17:1\n   |\nLL | impl Sized for TestE {}\n   | ^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed\n\n"}
[01:00:21] {"message":"explicit impls for the `Sized` trait are not permitted","code":{"code":"E0322","explanation":"\nThe `Sized` trait is a special trait built-in to the compiler for types with a\nconstant size known at compile-time. This trait is automatically implemented\nfor types as needed by the compiler, and it is currently disallowed to\nexplicitly implement it for a type.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":318,"byte_end":339,"line_start":22,"line_end":22,"column_start":1,"column_end":22,"is_primary":true,"text":[{"text":"impl Sized for MyType {}","highlight_start":1,"highlight_end":22}],"label":"impl of 'Sized' not allowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0322]: explicit impls for the `Sized` trait are not permitted\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:22:1\n   |\nLL | impl Sized for MyType {}\n   | ^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed\n\n"}
[01:00:21] {"message":"explicit impls for the `Sized` trait are not permitted","code":{"code":"E0322","explanation":"\nThe `Sized` trait is a special trait built-in to the compiler for types with a\nconstant size known at compile-time. This trait is automatically implemented\nfor types as needed by the compiler, and it is currently disallowed to\nexplicitly implement it for a type.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":427,"byte_end":458,"line_start":27,"line_end":27,"column_start":1,"column_end":32,"is_primary":true,"text":[{"text":"impl Sized for (MyType, MyType) {}","highlight_start":1,"highlight_end":32}],"label":"impl of 'Sized' not allowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0322]: explicit impls for the `Sized` trait are not permitted\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:27:1\n   |\nLL | impl Sized for (MyType, MyType) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed\n\n"}
[01:00:21] {"message":"explicit impls for the `Sized` trait are not permitted","code":{"code":"E0322","explanation":"\nThe `Sized` trait is a special trait built-in to the compiler for types with a\nconstant size known at compile-time. This trait is automatically implemented\nfor types as needed by the compiler, and it is currently disallowed to\nexplicitly implement it for a type.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":590,"byte_end":621,"line_start":34,"line_end":34,"column_start":1,"column_end":32,"is_primary":true,"text":[{"text":"impl Sized for &'static NotSync {}","highlight_start":1,"highlight_end":32}],"label":"impl of 'Sized' not allowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0322]: explicit impls for the `Sized` trait are not permitted\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:34:1\n   |\nLL | impl Sized for &'static NotSync {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed\n\n"}
[01:00:21] {"message":"explicit impls for the `Sized` trait are not permitted","code":{"code":"E0322","explanation":"\nThe `Sized` trait is a special trait built-in to the compiler for types with a\nconstant size known at compile-time. This trait is automatically implemented\nfor types as needed by the compiler, and it is currently disallowed to\nexplicitly implement it for a type.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":709,"byte_end":732,"line_start":39,"line_end":39,"column_start":1,"column_end":24,"is_primary":true,"text":[{"text":"impl Sized for [MyType] {}","highlight_start":1,"highlight_end":24}],"label":"impl of 'Sized' not allowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0322]: explicit impls for the `Sized` trait are not permitted\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:39:1\n   |\nLL | impl Sized for [MyType] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed\n\n"}
[01:00:21] {"message":"explicit impls for the `Sized` trait are not permitted","code":{"code":"E0322","explanation":"\nThe `Sized` trait is a special trait built-in to the compiler for types with a\nconstant size known at compile-time. This trait is automatically implemented\nfor types as needed by the compiler, and it is currently disallowed to\nexplicitly implement it for a type.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":864,"byte_end":897,"line_start":46,"line_end":46,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"impl Sized for &'static [NotSync] {}","highlight_start":1,"highlight_end":34}],"label":"impl of 'Sized' not allowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0322]: explicit impls for the `Sized` trait are not permitted\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:46:1\n   |\nLL | impl Sized for &'static [NotSync] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":427,"byte_end":458,"line_start":27,"line_end":27,"column_start":1,"column_end":32,"is_primary":true,"text":[{"text":"impl Sized for (MyType, MyType) {}","highlight_start":1,"highlight_end":32}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:27:1\n   |\nLL | impl Sized for (MyType, MyType) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":709,"byte_end":732,"line_start":39,"line_end":39,"column_start":1,"column_end":24,"is_primary":true,"text":[{"text":"impl Sized for [MyType] {}","highlight_start":1,"highlight_end":24}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:39:1\n   |\nLL | impl Sized for [MyType] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":864,"byte_end":897,"line_start":46,"line_end":46,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"impl Sized for &'static [NotSync] {}","highlight_start":1,"highlight_end":34}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate"^^^^^^ impl doesn't use types inside crate
[01:00:21] 42    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 44    = note: define and implement a trait or new type instead
[01:00:21] 45 
[01:00:21] 46 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 49 LL | impl Sized for [MyType] {}
[01:00:21] 50    | ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 51    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 53    = note: define and implement a trait or new type instead
[01:00:21] 54 
[01:00:21] 55 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 58 LL | impl Sized for &'static [NotSync] {}
[01:00:21] 59    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 60    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 62    = note: define and implement a trait or new type instead
[01:00:21] 64 error: aborting due to 9 previous errors
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/care not permitted","code":{"code":"E0322","explanation":"\nThe `Sized` trait is a special trait built-in to the compiler for types with a\nconstant size known at compile-time. This trait is automatically implemented\nfor types as needed by the compiler, and it is currently disallowed to\nexplicitly implement it for a type.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":864,"byte_end":897,"line_start":46,"line_end":46,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"impl Sized for &'static [NotSync] {}","highlight_start":1,"highlight_end":34}],"label":"impl of 'Sized' not allowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0322]: explicit impls for the `Sized` trait are not permitted\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:46:1\n   |\nLL | impl Sized for &'static [NotSync] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of 'Sized' not allowed\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":427,"byte_end":458,"line_start":27,"line_end":27,"column_start":1,"column_end":32,"is_primary":true,"text":[{"text":"impl Sized for (MyType, MyType) {}","highlight_start":1,"highlight_end":32}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:27:1\n   |\nLL | impl Sized for (MyType, MyType) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":709,"byte_end":732,"line_start":39,"line_end":39,"column_start":1,"column_end":24,"is_primary":true,"text":[{"text":"impl Sized for [MyType] {}","highlight_start":1,"highlight_end":24}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:39:1\n   |\nLL | impl Sized for [MyType] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-impls-sized.rs","byte_start":864,"byte_end":897,"line_start":46,"line_end":46,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"impl Sized for &'static [NotSync] {}","highlight_start":1,"highlight_end":34}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-impls-sized.rs:46:1\n   |\nLL | impl Sized for &'static [NotSync] {}\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to 9 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 9 previous errors\n\n"}
[01:00:21] {"message":"Some errors occurred: E0117, E0322.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0117, E0322.\n"}
[01:00:21] {"message":"For more information about an error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-impls-sized.rs#re' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-orphan.rs#old stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 4 LL | impl TheTrait<usize> for isize { }
[01:00:21] 5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 6    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 8    = note: define and implement a trait or new type instead
[01:00:21] 9 
[01:00:21] 10 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 13 LL | impl !Send for Vec<isize> { }
[01:00:21] 14    | ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 15    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 17    = note: define and implement a trait or new type instead
[01:00:21] 19 error: aborting due to 2 previous errors
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-orphan.old/coherence-orphan.old.stderr
[01:00:21] To update references, rerun the tests and pass the `--bless` flag
[01:00:21] To only update this specific test, also pass `--test-args coherence/coherence-orphan.rs`
[01:00:21] 
[01:00:21] error in revision `old`: 1 errors occurred comparing output.
[01:00:21] status: exit code: 1
[01:00:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-orphan.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "old" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-orphan.old/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/coherence/coherence-orphan.old/auxiliary" "-A" "unused"
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] ------------------------------------------
[01:00:21] stderr:
[01:00:21] stderr:
[01:00:21] ------------------------------------------
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-orphan.rs","byte_start":224,"byte_end":254,"line_start":13,"line_end":13,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"impl TheTrait<usize> for isize { }","highlight_start":1,"highlight_end":31}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-orphan.rs:13:1\n   |\nLL | impl TheTrait<usize> for isize { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this error:\n\n```compile_fail,E0117\nimpl Drop for u32 {}\n```\n\nTo avoid this kind of error, ensure that at least one local type is referenced\nby the `impl`:\n\n```\npub struct Foo; // you define your type in your crate\n\nimpl Drop for Foo { // and you can implement the trait on it!\n    // code of trait implementation here\n#   fn drop(&mut self) { }\n}\n\nimpl From<Foo> for i32 { // or you use a type from your crate as\n                         // a type parameter\n    fn from(i: Foo) -> i32 {\n        0\n    }\n}\n```\n\nAlternatively, define a trait locally and implement that instead:\n\n```\ntrait Bar {\n    fn get(&self) -> usize;\n}\n\nimpl Bar for u32 {\n    fn get(&self) -> usize { 0 }\n}\n```\n\nFor information on the design of the orphan rules, see [RFC 1023].\n\n[RFC 1023]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-orphan.rs","byte_start":380,"byte_end":405,"line_start":21,"line_end":21,"column_start":1,"column_end":26,"is_primary":true,"text":[{"text":"impl !Send for Vec<isize> { }","highlight_start":1,"highlight_end":26}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-orphan.rs:21:1\n   |\nLL | impl !Send for Vec<isize> { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[01:00:21] {"message":"For more information about this error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-orphan.rs#old' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-orphan.rs#re stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 4 LL | impl TheTrait<usize> for isize { }
[01:00:21] 5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 6    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 8    = note: define and implement a trait or new type instead
[01:00:21] 9 
[01:00:21] 10 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
[01:00:21] 
[01:00:21] 13 LL | impl !Send for Vec<isize> { }
[01:00:21] 14    | ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 15    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 17    = note: define and implement a trait or new type instead
[01:00:21] 19 error: aborting due to 2 previous errors
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] The actual stderr differed from the expected stderr.
[01:00:21] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-orphan.re/coherence-orphan.re.stderr
[01:00:21] To update references, rerun the tests and pass the `--bless` flag
[01:00:21] To only update this specific test, also pass `--test-args coherence/coherence-orphan.rs`
[01:00:21] 
[01:00:21] error in revision `re`: 1 errors occurred comparing output.
[01:00:21] status: exit code: 1
[01:00:21] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/coherence/coherence-orphan.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "re" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/coherence/coherence-orphan.re/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/coherence/coherence-orphan.re/au,"spans":[{"file_name":"/checkout/src/test/ui/coherence/coherence-orphan.rs","byte_start":224,"byte_end":254,"line_start":13,"line_end":13,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"impl TheTrait<usize> for isize { }","highlight_start":1,"highlight_end":31}],"label":"impl doesn't use types inside crate","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the impl does not reference only types defined in this crate","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-orphan.rs:13:1\n   |\nLL | impl TheTrait<usize> for isize { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"only traits defined in the current crate can be implemented for arbitrary types","code":{"code":"E0117","explanation":"\nThis error indicates a violation of one of Rust's orphan rules for trait\nimplementations. The rule prohibits any implementation of a foreign trait (a\ntrait defined in another crate) where\n\n - the type that is implementing the trait is foreign\n - all of the parameters being passed to the trait (if there are any) are also\n   foreign.\n\nHere's one example of this errored":null},{"message":"define and implement a trait or new type instead","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0117]: only traits defined in the current crate can be implemented for arbitrary types\n  --> /checkout/src/test/ui/coherence/coherence-overlapping-pairs.rs:11:1\n   |\nLL | impl<T> Remote for lib::Pair<T,Foo> { }\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate\n   |\n   = note: the impl does not reference only types defined in this crate\n   = note: define and implement a trait or new type instead\n\n"}
[01:00:21] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[01:00:21] {"message":"For more information about this error, try `rustc --explain E0117`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0117`.\n"}
[01:00:21] ------------------------------------------
[01:00:21] 
[01:00:21] thread '[ui] ui/coherence/coherence-overlapping-pairs.rs#re' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:00:21] 
[01:00:21] 
[01:00:21] ---- [ui] ui/coherence/coherence-pair-covered-uncovered-1.rs#re stdout ----
[01:00:21] diff of stderr:
[01:00:21] 
[01:00:21] 4 LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { }
[01:00:21] 5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
[01:00:21] 6    |
[01:00:21] -    = note: the impl does not reference any types defined in this crate
[01:00:21] +    = note: the impl does not reference only types defined in this crate
[01:00:21] 8    = note: define and implement a trait or new type instead
[01:00:21] 10 error: aborting due to previous error
[01:00:21] 
[01:00:21] 
[01:00:21] The actual stderr differed from the expected stderr.
---
[01:00:21] 
[01:00:21] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:495:22
[01:00:21] 
[01:00:21] 
[01:00:21] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:00:21] 
[01:00:21] 
[01:00:21] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:00:21] Build completed unsuccessfully in 0:04:01
[01:00:21] Build completed unsuccessfully in 0:04:01
[01:00:21] Makefile:48: recipe for target 'check' failed
[01:00:21] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00fd2096
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Jan  7 11:34:12 UTC 2019

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

@varkor
Copy link
Member

varkor commented Jan 7, 2019

@JohnTitor: if you run all the ui tests with the --bless flag (./x.py test src/test/ui --bless --stage 1) then it should automatically update all the test output to use the new message, which will fix the broken tests.

@JohnTitor
Copy link
Member Author

@varkor Thank you for letting me know. I fixed them.

@varkor
Copy link
Member

varkor commented Jan 7, 2019

@JohnTitor: that looks great! If you could squash the two commits down to one, I'll approve.

Save quite a few syscalls and avoiding pushing in a loop.
@JohnTitor
Copy link
Member Author

I couldn't squash my commits well.
Sorry but I'll re-open the PR, please see it.

@JohnTitor JohnTitor closed this Jan 7, 2019
@JohnTitor JohnTitor deleted the improve-the-wording branch January 7, 2019 17:15
@rust-highfive
Copy link
Collaborator

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.

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)

@JohnTitor JohnTitor mentioned this pull request Jan 7, 2019
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Jan 12, 2019
…varkor

Improve the wording

I'm sorry but re-opened the PR because I failed to squash commits(rust-lang#57397).

Fixes rust-lang#55752.
r? @varkor
Centril added a commit to Centril/rust that referenced this pull request Jan 13, 2019
…varkor

Improve the wording

I'm sorry but re-opened the PR because I failed to squash commits(rust-lang#57397).

Fixes rust-lang#55752.
r? @varkor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants