]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-negative-impls-copy-bad.stderr
Rollup merge of #104744 - notriddle:notriddle/struct-fields-display-block, r=Guillaum...
[rust.git] / src / test / ui / coherence / coherence-negative-impls-copy-bad.stderr
1 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
2   --> $DIR/coherence-negative-impls-copy-bad.rs:4:1
3    |
4 LL | impl !Copy for str {}
5    | ^^^^^^^^^^^^^^^---
6    | |              |
7    | |              `str` is not defined in the current crate
8    | impl doesn't use only types from inside the current crate
9    |
10    = note: define and implement a trait or new type instead
11
12 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
13   --> $DIR/coherence-negative-impls-copy-bad.rs:7:1
14    |
15 LL | impl !Copy for fn() {}
16    | ^^^^^^^^^^^^^^^----
17    | |              |
18    | |              `fn()` is not defined in the current crate
19    | impl doesn't use only types from inside the current crate
20    |
21    = note: define and implement a trait or new type instead
22
23 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
24   --> $DIR/coherence-negative-impls-copy-bad.rs:10:1
25    |
26 LL | impl !Copy for () {}
27    | ^^^^^^^^^^^^^^^--
28    | |              |
29    | |              this is not defined in the current crate because tuples are always foreign
30    | impl doesn't use only types from inside the current crate
31    |
32    = note: define and implement a trait or new type instead
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0117`.