]> git.proxmox.com Git - rustc.git/blob - src/test/ui/coherence/coherence-overlap-super-negative.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / 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() {}