]> git.proxmox.com Git - rustc.git/blame - src/test/ui/coherence/coherence-impls-send.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / coherence / coherence-impls-send.stderr
CommitLineData
74b04a01
XL
1error[E0119]: conflicting implementations of trait `std::marker::Send` for type `&[NotSync]`:
2 --> $DIR/coherence-impls-send.rs:25:1
3 |
4LL | unsafe impl Send for &'static [NotSync] {}
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 = note: conflicting implementation in crate `core`:
1b1a35ee
XL
8 - impl<T> Send for &T
9 where T: Sync, T: ?Sized;
74b04a01
XL
10 = note: upstream crates may add a new impl of trait `std::marker::Sync` for type `[NotSync]` in future versions
11
b7449926 12error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
74b04a01 13 --> $DIR/coherence-impls-send.rs:16:1
b7449926
XL
14 |
15LL | unsafe impl Send for (MyType, MyType) {}
e74abb32
XL
16 | ^^^^^^^^^^^^^^^^^^^^^----------------
17 | | |
18 | | this is not defined in the current crate because tuples are always foreign
19 | impl doesn't use only types from inside the current crate
b7449926 20 |
b7449926
XL
21 = note: define and implement a trait or new type instead
22
1b1a35ee 23error[E0321]: cross-crate traits with a default impl, like `Send`, can only be implemented for a struct/enum type, not `&'static NotSync`
74b04a01 24 --> $DIR/coherence-impls-send.rs:19:1
b7449926
XL
25 |
26LL | unsafe impl Send for &'static NotSync {}
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type
28
29error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
74b04a01 30 --> $DIR/coherence-impls-send.rs:22:1
b7449926
XL
31 |
32LL | unsafe impl Send for [MyType] {}
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[E0117]: only traits defined in the current crate can be implemented for arbitrary types
74b04a01 41 --> $DIR/coherence-impls-send.rs:25:1
b7449926
XL
42 |
43LL | unsafe impl Send for &'static [NotSync] {}
e74abb32
XL
44 | ^^^^^^^^^^^^^^^^^^^^^------------------
45 | | |
46 | | this is not defined in the current crate because slices are always foreign
47 | impl doesn't use only types from inside the current crate
b7449926 48 |
b7449926
XL
49 = note: define and implement a trait or new type instead
50
74b04a01 51error: aborting due to 5 previous errors
b7449926 52
74b04a01 53Some errors have detailed explanations: E0117, E0119, E0321.
b7449926 54For more information about an error, try `rustc --explain E0117`.