]>
Commit | Line | Data |
---|---|---|
9fa01778 XL |
1 | // rust-lang/rust#57979 : the initial support for `impl Trait` didn't |
2 | // properly check syntax hidden behind an associated type projection, | |
3 | // but it did catch *some cases*. This is checking that we continue to | |
60c5eb7d | 4 | // properly emit errors for those. |
9fa01778 XL |
5 | // |
6 | // issue-57979-nested-impl-trait-in-assoc-proj.rs shows the main case | |
7 | // that we were previously failing to catch. | |
8 | ||
9 | struct Deeper<T>(T); | |
10 | ||
60c5eb7d XL |
11 | pub trait Foo<T> { } |
12 | pub trait Bar { } | |
13 | pub trait Quux { type Assoc; } | |
14 | pub fn demo(_: impl Quux<Assoc=Deeper<impl Foo<impl Bar>>>) { } | |
15 | //~^ ERROR nested `impl Trait` is not allowed | |
9fa01778 XL |
16 | |
17 | fn main() { } |