]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-overlap-downstream-inherent.rs
Merge commit 'ea199bacef07213dbe008841b89c450e3bf0c638' into rustfmt-sync
[rust.git] / src / test / ui / coherence / coherence-overlap-downstream-inherent.rs
1 // Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
2 // though no impls are found.
3
4 struct Sweet<X>(X);
5 pub trait Sugar {}
6 pub trait Fruit {}
7 impl<T:Sugar> Sweet<T> { fn dummy(&self) { } }
8 //~^ ERROR E0592
9 impl<T:Fruit> Sweet<T> { fn dummy(&self) { } }
10
11 trait Bar<X> {}
12 struct A<T, X>(T, X);
13 impl<X, T> A<T, X> where T: Bar<X> { fn f(&self) {} }
14 //~^ ERROR E0592
15 impl<X> A<i32, X> { fn f(&self) {} }
16
17 fn main() {}