]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-impls-copy.rs
Stabilize File::options()
[rust.git] / src / test / ui / coherence / coherence-impls-copy.rs
1 #![feature(negative_impls)]
2
3 use std::marker::Copy;
4
5 impl Copy for i32 {}
6 //~^ ERROR E0119
7 //~| ERROR E0117
8 enum TestE {
9   A
10 }
11
12 struct MyType;
13
14 struct NotSync;
15 impl !Sync for NotSync {}
16
17 impl Copy for TestE {}
18 impl Clone for TestE { fn clone(&self) -> Self { *self } }
19
20 impl Copy for MyType {}
21
22 impl Copy for &'static mut MyType {}
23 //~^ ERROR E0206
24 impl Clone for MyType { fn clone(&self) -> Self { *self } }
25
26 impl Copy for (MyType, MyType) {}
27 //~^ ERROR E0206
28 //~| ERROR E0117
29 impl Copy for &'static NotSync {}
30 //~^  ERROR E0119
31 impl Copy for [MyType] {}
32 //~^ ERROR E0206
33 //~| ERROR E0117
34 impl Copy for &'static [NotSync] {}
35 //~^ ERROR E0119
36 //~| ERROR E0117
37 fn main() {
38 }