1 // aux-build:coherence_copy_like_lib.rs
3 // Test that we are able to introduce a negative constraint that
4 // `MyType: !MyTrait` along with other "fundamental" wrappers.
6 extern crate coherence_copy_like_lib as lib;
8 struct MyType { x: i32 }
10 trait MyTrait { fn foo() {} }
11 impl<T: lib::MyCopy> MyTrait for T { }
13 // `MyStruct` is not declared fundamental, therefore this would
16 // MyStruct<MyType>: !MyTrait
18 // which we cannot approve.
19 impl MyTrait for lib::MyStruct<MyType> { }