2017-08-01 01:53:02 -05:00
|
|
|
// Tests that we consider `T: Sugar + Fruit` to be ambiguous, even
|
|
|
|
// though no impls are found.
|
|
|
|
|
|
|
|
pub trait Sugar {}
|
|
|
|
pub trait Fruit {}
|
|
|
|
pub trait Sweet {}
|
|
|
|
impl<T:Sugar> Sweet for T { }
|
|
|
|
impl<T:Fruit> Sweet for T { }
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2017-08-01 01:53:02 -05:00
|
|
|
|
|
|
|
pub trait Foo<X> {}
|
|
|
|
pub trait Bar<X> {}
|
|
|
|
impl<X, T> Foo<X> for T where T: Bar<X> {}
|
|
|
|
impl<X> Foo<X> for i32 {}
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2017-08-01 01:53:02 -05:00
|
|
|
|
|
|
|
fn main() { }
|