]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-overlap-downstream.rs
Rollup merge of #98391 - joboet:sgx_parker, r=m-ou-se
[rust.git] / src / test / ui / coherence / coherence-overlap-downstream.rs
1 // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
2 // though no impls are found.
3
4 pub trait Sugar {}
5 pub trait Fruit {}
6 pub trait Sweet {}
7 impl<T:Sugar> Sweet for T { }
8 impl<T:Fruit> Sweet for T { }
9 //~^ ERROR E0119
10
11 pub trait Foo<X> {}
12 pub trait Bar<X> {}
13 impl<X, T> Foo<X> for T where T: Bar<X> {}
14 impl<X> Foo<X> for i32 {}
15 //~^ ERROR E0119
16
17 fn main() { }