]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence-overlap-super-negative.rs
Auto merge of #106853 - TimNN:undo-remap, r=oli-obk
[rust.git] / tests / ui / coherence / coherence-overlap-super-negative.rs
1 // check-pass
2
3 #![feature(negative_impls)]
4 #![feature(rustc_attrs)]
5 #![feature(with_negative_coherence)]
6
7 trait Trait1: Trait2 {}
8 trait Trait2 {}
9
10 struct MyType {}
11 impl !Trait2 for MyType {}
12
13 #[rustc_strict_coherence]
14 trait Foo {}
15 impl<T: Trait1> Foo for T {}
16 impl Foo for MyType {}
17
18 fn main() {}