2023-09-20 19:41:19 +00:00
|
|
|
//@ revisions: old next
|
2023-12-14 12:11:28 +00:00
|
|
|
//@[next] compile-flags: -Znext-solver
|
2023-09-20 19:41:19 +00:00
|
|
|
|
2017-08-01 06:53:02 +00: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 15:28:02 +00:00
|
|
|
//~^ ERROR E0119
|
2017-08-01 06:53:02 +00: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 15:28:02 +00:00
|
|
|
//~^ ERROR E0119
|
2017-08-01 06:53:02 +00:00
|
|
|
|
|
|
|
fn main() { }
|