]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-impls-send.rs
Rollup merge of #85766 - workingjubilee:file-options, r=yaahc
[rust.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 only traits defined in the current crate
27
28 fn main() {}