summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.rs
blob: 5a444d3dfddfa12a18cb650c2f788e318009fea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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 an
// `impl Trait` in that context.

pub trait Foo<T> { }
pub trait Bar { }
pub trait Quux { type Assoc; }
pub fn demo(_: impl Quux<Assoc=impl Foo<impl Bar>>) { }
//~^ ERROR nested `impl Trait` is not allowed

fn main() { }