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

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

20 lines
318 B
Rust
Raw Normal View History

// 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>();
//~^ ERROR type annotations needed
}
fn main() {}