2019-02-22 08:10:12 -06:00
|
|
|
// rust-lang/rust#57979 : the initial support for `impl Trait` didn't
|
|
|
|
// properly check syntax hidden behind an associated type projection.
|
|
|
|
// Here we test behavior of occurrences of `impl Trait` within a path
|
|
|
|
// component in that context.
|
|
|
|
|
2019-08-03 14:59:22 -05:00
|
|
|
pub trait Bar { }
|
|
|
|
pub trait Quux<T> { type Assoc; }
|
|
|
|
pub fn demo(_: impl Quux<(), Assoc=<() as Quux<impl Bar>>::Assoc>) { }
|
|
|
|
//~^ ERROR `impl Trait` is not allowed in path parameters
|
|
|
|
impl<T> Quux<T> for () { type Assoc = u32; }
|
2019-02-22 08:10:12 -06:00
|
|
|
|
|
|
|
fn main() { }
|