]> git.proxmox.com Git - rustc.git/blob - src/test/ui/coherence/coherence-impls-send.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / coherence / coherence-impls-send.rs
1 #![feature(negative_impls)]
2
3 use std::marker::Copy;
4
5 enum TestE {
6 A,
7 }
8
9 struct MyType;
10
11 struct NotSync;
12 impl !Sync for NotSync {}
13
14 unsafe impl Send for TestE {}
15 unsafe impl Send for MyType {}
16 unsafe impl Send for (MyType, MyType) {}
17 //~^ ERROR E0117
18
19 unsafe impl Send for &'static NotSync {}
20 //~^ ERROR E0321
21
22 unsafe impl Send for [MyType] {}
23 //~^ ERROR E0117
24
25 unsafe impl Send for &'static [NotSync] {}
26 //~^ ERROR conflicting implementations of trait
27 //~| ERROR only traits defined in the current crate
28
29 fn main() {}