]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/issues/issue-57979-impl-trait-in-path.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 a path
4 // component in that context.
7 pub trait Quux
<T
> { type Assoc; }
8 pub fn demo(_
: impl Quux
<(), Assoc
=<() as Quux
<impl Bar
>>::Assoc
>) { }
9 //~^ ERROR `impl Trait` is not allowed in path parameters
10 impl<T
> Quux
<T
> for () { type Assoc = u32; }