]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-impls-copy.rs
Auto merge of #103459 - ChrisDenton:propagate-nulls, r=thomcc
[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 E0117
7 enum TestE {
8   A
9 }
10
11 struct MyType;
12
13 struct NotSync;
14 impl !Sync for NotSync {}
15
16 impl Copy for TestE {}
17 impl Clone for TestE { fn clone(&self) -> Self { *self } }
18
19 impl Copy for MyType {}
20
21 impl Copy for &'static mut MyType {}
22 //~^ ERROR E0206
23 impl Clone for MyType { fn clone(&self) -> Self { *self } }
24
25 impl Copy for (MyType, MyType) {}
26 //~^ ERROR E0206
27 //~| ERROR E0117
28 impl Copy for &'static NotSync {}
29 //~^  ERROR E0119
30 impl Copy for [MyType] {}
31 //~^ ERROR E0206
32 //~| ERROR E0117
33 impl Copy for &'static [NotSync] {}
34 //~^ ERROR E0117
35 fn main() {
36 }