]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-overlap-super-negative.rs
Rollup merge of #104647 - RalfJung:alloc-strict-provenance, r=thomcc
[rust.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() {}