]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence_local_err_struct.rs
Rollup merge of #104467 - fuzzypixelz:fix/attempt-to-substract-with-overflow, r=compi...
[rust.git] / src / test / ui / coherence / coherence_local_err_struct.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 #![allow(dead_code)]
6
7 extern crate coherence_copy_like_lib as lib;
8
9 struct MyType { x: i32 }
10
11 // These are all legal because they are all fundamental types:
12
13 // MyStruct is not fundamental.
14 impl lib::MyCopy for lib::MyStruct<MyType> { }
15 //~^ ERROR E0117
16
17
18 fn main() { }