]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence_copy_like.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / coherence / coherence_copy_like.rs
1 // run-pass
2 #![allow(dead_code)]
3 // Test that we are able to introduce a negative constraint that
4 // `MyType: !MyTrait` along with other "fundamental" wrappers.
5
6 // aux-build:coherence_copy_like_lib.rs
7
8 extern crate coherence_copy_like_lib as lib;
9
10 struct MyType { x: i32 }
11
12 trait MyTrait { }
13 impl<T: lib::MyCopy> MyTrait for T { }
14 impl MyTrait for MyType { }
15 impl<'a> MyTrait for &'a MyType { }
16 impl MyTrait for Box<MyType> { }
17 impl<'a> MyTrait for &'a Box<MyType> { }
18
19 fn main() { }