]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-57979-nested-impl-trait-in-assoc-proj.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / impl-trait / issues / issue-57979-nested-impl-trait-in-assoc-proj.rs
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 an
4 // `impl Trait` in that context.
5
6 pub trait Foo<T> { }
7 pub trait Bar { }
8 pub trait Quux { type Assoc; }
9 pub fn demo(_: impl Quux<Assoc=impl Foo<impl Bar>>) { }
10 //~^ ERROR nested `impl Trait` is not allowed
11
12 fn main() { }