2023-03-27 21:48:43 +00:00
|
|
|
// compile-flags: -Ztrait-solver=next
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
type Assoc;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Bar {}
|
|
|
|
fn needs_bar<S: Bar>() {}
|
|
|
|
|
|
|
|
fn test<T: Foo<Assoc = <T as Foo>::Assoc>>() {
|
|
|
|
needs_bar::<T::Assoc>();
|
2023-04-09 04:29:43 +00:00
|
|
|
//~^ ERROR overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
|
2023-03-27 21:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|