summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/overflow/recursive-self-normalization.rs
blob: d15df7dea73e407a05f192c81b9f96237dec516d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//~ 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() {}