2023-06-27 16:13:50 -05:00
|
|
|
//~ ERROR overflow
|
2023-03-27 16:48:43 -05:00
|
|
|
// compile-flags: -Ztrait-solver=next
|
|
|
|
|
|
|
|
trait Foo1 {
|
|
|
|
type Assoc1;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Foo2 {
|
|
|
|
type Assoc2;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Bar {}
|
|
|
|
fn needs_bar<S: Bar>() {}
|
|
|
|
|
|
|
|
fn test<T: Foo1<Assoc1 = <T as Foo2>::Assoc2> + Foo2<Assoc2 = <T as Foo1>::Assoc1>>() {
|
|
|
|
needs_bar::<T::Assoc1>();
|
2023-04-08 23:29:43 -05:00
|
|
|
//~^ ERROR overflow evaluating the requirement `<T as Foo1>::Assoc1: Bar`
|
2023-03-27 16:48:43 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|