]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-impls-copy.stderr
Stabilize File::options()
[rust.git] / src / test / ui / coherence / coherence-impls-copy.stderr
1 error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `i32`
2   --> $DIR/coherence-impls-copy.rs:5:1
3    |
4 LL | impl Copy for i32 {}
5    | ^^^^^^^^^^^^^^^^^
6    |
7    = note: conflicting implementation in crate `core`:
8            - impl Copy for i32;
9
10 error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&NotSync`
11   --> $DIR/coherence-impls-copy.rs:29:1
12    |
13 LL | impl Copy for &'static NotSync {}
14    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = note: conflicting implementation in crate `core`:
17            - impl<T> 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:34:1
22    |
23 LL | impl Copy for &'static [NotSync] {}
24    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25    |
26    = note: conflicting implementation in crate `core`:
27            - impl<T> 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:22: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:26: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:31: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:5:1
50    |
51 LL | impl Copy for i32 {}
52    | ^^^^^^^^^^^^^^---
53    | |             |
54    | |             `i32` is not defined in the current crate
55    | impl doesn't use only types from inside the current crate
56    |
57    = note: define and implement a trait or new type instead
58
59 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
60   --> $DIR/coherence-impls-copy.rs:26:1
61    |
62 LL | impl Copy for (MyType, MyType) {}
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
67    |
68    = note: define and implement a trait or new type instead
69
70 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
71   --> $DIR/coherence-impls-copy.rs:31:1
72    |
73 LL | impl Copy for [MyType] {}
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
78    |
79    = note: define and implement a trait or new type instead
80
81 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
82   --> $DIR/coherence-impls-copy.rs:34:1
83    |
84 LL | impl Copy for &'static [NotSync] {}
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
89    |
90    = note: define and implement a trait or new type instead
91
92 error: aborting due to 10 previous errors
93
94 Some errors have detailed explanations: E0117, E0119, E0206.
95 For more information about an error, try `rustc --explain E0117`.