]> git.proxmox.com Git - rustc.git/blob - src/test/ui/coherence/coherence-impls-copy.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / coherence / coherence-impls-copy.stderr
1 error[E0117]: only traits defined in the current crate can be implemented for primitive types
2 --> $DIR/coherence-impls-copy.rs:5:1
3 |
4 LL | impl Copy for i32 {}
5 | ^^^^^^^^^^^^^^---
6 | | |
7 | | `i32` 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[E0119]: conflicting implementations of trait `Copy` for type `&NotSync`
13 --> $DIR/coherence-impls-copy.rs:28:1
14 |
15 LL | impl Copy for &'static NotSync {}
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 |
18 = note: conflicting implementation in crate `core`:
19 - impl<T> Copy for &T
20 where T: ?Sized;
21
22 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
23 --> $DIR/coherence-impls-copy.rs:33:1
24 |
25 LL | impl Copy for &'static [NotSync] {}
26 | ^^^^^^^^^^^^^^------------------
27 | | |
28 | | this is not defined in the current crate because slices are always foreign
29 | impl doesn't use only types from inside the current crate
30 |
31 = note: define and implement a trait or new type instead
32
33 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
34 --> $DIR/coherence-impls-copy.rs:25:1
35 |
36 LL | impl Copy for (MyType, MyType) {}
37 | ^^^^^^^^^^^^^^----------------
38 | | |
39 | | this is not defined in the current crate because tuples are always foreign
40 | impl doesn't use only types from inside the current crate
41 |
42 = note: define and implement a trait or new type instead
43
44 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
45 --> $DIR/coherence-impls-copy.rs:30:1
46 |
47 LL | impl Copy for [MyType] {}
48 | ^^^^^^^^^^^^^^--------
49 | | |
50 | | this is not defined in the current crate because slices are always foreign
51 | impl doesn't use only types from inside the current crate
52 |
53 = note: define and implement a trait or new type instead
54
55 error[E0206]: the trait `Copy` may not be implemented for this type
56 --> $DIR/coherence-impls-copy.rs:21:15
57 |
58 LL | impl Copy for &'static mut MyType {}
59 | ^^^^^^^^^^^^^^^^^^^ type is not a structure or enumeration
60
61 error[E0206]: the trait `Copy` may not be implemented for this type
62 --> $DIR/coherence-impls-copy.rs:25:15
63 |
64 LL | impl Copy for (MyType, MyType) {}
65 | ^^^^^^^^^^^^^^^^ type is not a structure or enumeration
66
67 error[E0206]: the trait `Copy` may not be implemented for this type
68 --> $DIR/coherence-impls-copy.rs:30:15
69 |
70 LL | impl Copy for [MyType] {}
71 | ^^^^^^^^ type is not a structure or enumeration
72
73 error: aborting due to 8 previous errors
74
75 Some errors have detailed explanations: E0117, E0119, E0206.
76 For more information about an error, try `rustc --explain E0117`.