1 // rust-lang/rust#57979 : the initial support for `impl Trait` didn't
2 // properly check syntax hidden behind an associated type projection.
3 // Here we test behavior of occurrences of `impl Trait` within a path
4 // component in that context.
7 pub trait Quux<T> { type Assoc; }
8 pub fn demo(_: impl Quux<(), Assoc=<() as Quux<impl Bar>>::Assoc>) { }
9 //~^ ERROR `impl Trait` is not allowed in path parameters
10 impl<T> Quux<T> for () { type Assoc = u32; }