]>
Commit | Line | Data |
---|---|---|
c34b1796 AL |
1 | // Test that we are able to introduce a negative constraint that |
2 | // `MyType: !MyTrait` along with other "fundamental" wrappers. | |
3 | ||
4 | // aux-build:coherence_copy_like_lib.rs | |
a1dfa0c6 | 5 | |
c34b1796 AL |
6 | |
7 | extern crate coherence_copy_like_lib as lib; | |
8 | ||
c34b1796 AL |
9 | struct MyType { x: i32 } |
10 | ||
cc61c64b | 11 | trait MyTrait { fn foo() {} } |
c34b1796 | 12 | |
54a0048b | 13 | impl<T: lib::MyCopy> MyTrait for T { } |
c34b1796 AL |
14 | |
15 | // Tuples are not fundamental. | |
0731742a | 16 | impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { } |
60c5eb7d | 17 | //~^ ERROR E0119 |
c34b1796 | 18 | |
a1dfa0c6 | 19 | |
c34b1796 | 20 | fn main() { } |