summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs
blob: 9d938a61600f54705db35462b7b402c579bf1009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![feature(type_alias_impl_trait)]

fn main() {}

pub trait Captures<'a> {}

impl<'a, T: ?Sized> Captures<'a> for T {}

type Two<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>;

fn one<'a>(t: &'a ()) -> Two<'a, 'a> {
    t
    //~^ ERROR non-defining opaque type use
}