]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/issues/issue-57979-deeply-nested-impl-trait-in-assoc-proj.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / impl-trait / issues / issue-57979-deeply-nested-impl-trait-in-assoc-proj.rs
CommitLineData
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
9struct Deeper<T>(T);
10
60c5eb7d
XL
11pub trait Foo<T> { }
12pub trait Bar { }
13pub trait Quux { type Assoc; }
14pub fn demo(_: impl Quux<Assoc=Deeper<impl Foo<impl Bar>>>) { }
15//~^ ERROR nested `impl Trait` is not allowed
9fa01778
XL
16
17fn main() { }