]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence-negative-impls-copy.rs
Auto merge of #106853 - TimNN:undo-remap, r=oli-obk
[rust.git] / tests / ui / coherence / coherence-negative-impls-copy.rs
1 // check-pass
2 // regression test for issue #101836
3
4 #![feature(negative_impls, extern_types)]
5 #![crate_type = "lib"]
6
7 struct NonCopy;
8 struct NeverCopy(NonCopy);
9
10 impl !Copy for NeverCopy {}
11
12
13 struct WithDrop;
14 impl Drop for WithDrop { fn drop(&mut self) {} }
15
16 impl !Copy for WithDrop {}
17
18
19 struct Type;
20 trait Trait {}
21 extern {
22     type ExternType;
23 }
24
25 impl !Copy for &mut Type {}
26
27 impl !Copy for dyn Trait {}
28
29 impl !Copy for ExternType {}