about summary refs log tree commit diff
path: root/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.rs
blob: 21df53c43d7ca8fefabe3da4d806529279b28939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![feature(impl_trait_in_assoc_type)]

trait Foo {
    type Assoc<'a>;
    fn bar<'a: 'a>();
}

impl Foo for () {
    type Assoc<'a> = impl Sized;
    fn bar<'a: 'a>()
    where
        Self::Assoc<'a>:,
    {
        let _ = |x: &'a ()| {
            let _: Self::Assoc<'a> = x;
            //~^ ERROR expected generic lifetime parameter, found `'_`
        };
    }
}

fn main() {}