]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0117]: only traits defined in the current crate can be implemented for arbitrary types |
0731742a | 2 | --> $DIR/coherence-impls-send.rs:20:1 |
b7449926 XL |
3 | | |
4 | LL | unsafe impl Send for (MyType, MyType) {} | |
e74abb32 XL |
5 | | ^^^^^^^^^^^^^^^^^^^^^---------------- |
6 | | | | | |
7 | | | this is not defined in the current crate because tuples are always foreign | |
8 | | impl doesn't use only types from inside the current crate | |
b7449926 | 9 | | |
b7449926 XL |
10 | = note: define and implement a trait or new type instead |
11 | ||
12 | error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync` | |
0731742a | 13 | --> $DIR/coherence-impls-send.rs:24:1 |
b7449926 XL |
14 | | |
15 | LL | unsafe impl Send for &'static NotSync {} | |
16 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type | |
17 | ||
18 | error[E0117]: only traits defined in the current crate can be implemented for arbitrary types | |
0731742a | 19 | --> $DIR/coherence-impls-send.rs:28:1 |
b7449926 XL |
20 | | |
21 | LL | unsafe impl Send for [MyType] {} | |
e74abb32 XL |
22 | | ^^^^^^^^^^^^^^^^^^^^^-------- |
23 | | | | | |
24 | | | this is not defined in the current crate because slices are always foreign | |
25 | | impl doesn't use only types from inside the current crate | |
b7449926 | 26 | | |
b7449926 XL |
27 | = note: define and implement a trait or new type instead |
28 | ||
29 | error[E0117]: only traits defined in the current crate can be implemented for arbitrary types | |
0731742a | 30 | --> $DIR/coherence-impls-send.rs:32:1 |
b7449926 XL |
31 | | |
32 | LL | unsafe impl Send for &'static [NotSync] {} | |
e74abb32 XL |
33 | | ^^^^^^^^^^^^^^^^^^^^^------------------ |
34 | | | | | |
35 | | | this is not defined in the current crate because slices are always foreign | |
36 | | impl doesn't use only types from inside the current crate | |
b7449926 | 37 | | |
b7449926 XL |
38 | = note: define and implement a trait or new type instead |
39 | ||
40 | error: aborting due to 4 previous errors | |
41 | ||
48663c56 | 42 | Some errors have detailed explanations: E0117, E0321. |
b7449926 | 43 | For more information about an error, try `rustc --explain E0117`. |