summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/bound_reduction2.rs
blob: 4d2890b5de583c48bc63a8e6d727e4d3516f03f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(type_alias_impl_trait)]

fn main() {}

trait TraitWithAssoc {
    type Assoc;
}

type Foo<V> = impl Trait<V>;

trait Trait<U> {}

impl<W> Trait<W> for () {}

fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> {
    ()
    //~^ ERROR non-defining opaque type use
}