rust/tests/ui/traits/new-solver/recursive-self-normalization.rs
2023-04-10 16:36:30 +00:00

16 lines
278 B
Rust

// 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>();
//~^ ERROR overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
}
fn main() {}