]> git.proxmox.com Git - rustc.git/blame - src/test/ui/coherence/coherence-impls-send.re.stderr
New upstream version 1.40.0+dfsg1
[rustc.git] / src / test / ui / coherence / coherence-impls-send.re.stderr
CommitLineData
b7449926 1error[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 |
4LL | 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
12error[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 |
15LL | unsafe impl Send for &'static NotSync {}
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type
17
18error[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 |
21LL | 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
29error[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 |
32LL | 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
40error: aborting due to 4 previous errors
41
48663c56 42Some errors have detailed explanations: E0117, E0321.
b7449926 43For more information about an error, try `rustc --explain E0117`.