]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence-overlap-trait-alias.rs
Auto merge of #106853 - TimNN:undo-remap, r=oli-obk
[rust.git] / tests / ui / coherence / coherence-overlap-trait-alias.rs
1 #![feature(rustc_attrs)]
2 #![feature(trait_alias)]
3 #![feature(with_negative_coherence)]
4
5 trait A {}
6 trait B {}
7 trait AB = A + B;
8
9 impl A for u32 {}
10 impl B for u32 {}
11
12 #[rustc_strict_coherence]
13 trait C {}
14 impl<T: AB> C for T {}
15 impl C for u32 {}
16 //~^ ERROR
17 // FIXME it's giving an ungreat error but unsure if we care given that it's using an internal rustc
18 // attribute and an artificial code path for testing purposes
19
20 fn main() {}