rust/tests/ui/traits/new-solver/recursive-self-normalization.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
352 B
Rust
Raw Normal View History

2023-06-27 16:13:50 -05:00
//~ ERROR overflow evaluating the requirement `<T as Foo>::Assoc` [E0275]
// 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() {}