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