]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence_copy_like_err_fundamental_struct_tuple.rs
Merge commit 'ea199bacef07213dbe008841b89c450e3bf0c638' into rustfmt-sync
[rust.git] / src / test / ui / coherence / coherence_copy_like_err_fundamental_struct_tuple.rs
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
5
6
7 extern crate coherence_copy_like_lib as lib;
8
9 struct MyType { x: i32 }
10
11 trait MyTrait { fn foo() {} }
12
13 impl<T: lib::MyCopy> MyTrait for T { }
14
15 // Tuples are not fundamental.
16 impl MyTrait for lib::MyFundamentalStruct<(MyType,)> { }
17 //~^ ERROR E0119
18
19
20 fn main() { }