1 // Test that we are able to introduce a negative constraint that
2 // `MyType: !MyTrait` along with other "fundamental" wrappers.
4 // aux-build:coherence_copy_like_lib.rs
9 #![cfg_attr(re, feature(re_rebalance_coherence))]
12 extern crate coherence_copy_like_lib as lib;
14 struct MyType { x: i32 }
16 // These are all legal because they are all fundamental types:
18 impl lib::MyCopy for MyType { }
19 impl<'a> lib::MyCopy for &'a MyType { }
20 impl<'a> lib::MyCopy for &'a Box<MyType> { }
21 impl lib::MyCopy for Box<MyType> { }
22 impl lib::MyCopy for lib::MyFundamentalStruct<MyType> { }
23 impl lib::MyCopy for lib::MyFundamentalStruct<Box<MyType>> { }