]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-impls-copy.re.stderr
Improve the wording
[rust.git] / src / test / ui / coherence / coherence-impls-copy.re.stderr
1 error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`:
2   --> $DIR/coherence-impls-copy.rs:8:1
3    |
4 LL | impl Copy for i32 {}
5    | ^^^^^^^^^^^^^^^^^
6    |
7    = note: conflicting implementation in crate `core`:
8            - impl std::marker::Copy for i32;
9
10 error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`:
11   --> $DIR/coherence-impls-copy.rs:37:1
12    |
13 LL | impl Copy for &'static NotSync {}
14    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = note: conflicting implementation in crate `core`:
17            - impl<T> std::marker::Copy for &T
18              where T: ?Sized;
19
20 error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:
21   --> $DIR/coherence-impls-copy.rs:45:1
22    |
23 LL | impl Copy for &'static [NotSync] {}
24    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25    |
26    = note: conflicting implementation in crate `core`:
27            - impl<T> std::marker::Copy for &T
28              where T: ?Sized;
29
30 error[E0206]: the trait `Copy` may not be implemented for this type
31   --> $DIR/coherence-impls-copy.rs:27:15
32    |
33 LL | impl Copy for &'static mut MyType {}
34    |               ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration
35
36 error[E0206]: the trait `Copy` may not be implemented for this type
37   --> $DIR/coherence-impls-copy.rs:32:15
38    |
39 LL | impl Copy for (MyType, MyType) {}
40    |               ^^^^^^^^^^^^^^^^ type is not a structure or enumeration
41
42 error[E0206]: the trait `Copy` may not be implemented for this type
43   --> $DIR/coherence-impls-copy.rs:40:15
44    |
45 LL | impl Copy for [MyType] {}
46    |               ^^^^^^^^ type is not a structure or enumeration
47
48 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
49   --> $DIR/coherence-impls-copy.rs:8:1
50    |
51 LL | impl Copy for i32 {}
52    | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
53    |
54    = note: the impl does not reference only types defined in this crate
55    = note: define and implement a trait or new type instead
56
57 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
58   --> $DIR/coherence-impls-copy.rs:32:1
59    |
60 LL | impl Copy for (MyType, MyType) {}
61    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
62    |
63    = note: the impl does not reference only types defined in this crate
64    = note: define and implement a trait or new type instead
65
66 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
67   --> $DIR/coherence-impls-copy.rs:40:1
68    |
69 LL | impl Copy for [MyType] {}
70    | ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
71    |
72    = note: the impl does not reference only types defined in this crate
73    = note: define and implement a trait or new type instead
74
75 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
76   --> $DIR/coherence-impls-copy.rs:45:1
77    |
78 LL | impl Copy for &'static [NotSync] {}
79    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
80    |
81    = note: the impl does not reference only types defined in this crate
82    = note: define and implement a trait or new type instead
83
84 error: aborting due to 10 previous errors
85
86 Some errors occurred: E0117, E0119, E0206.
87 For more information about an error, try `rustc --explain E0117`.