summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs
blob: 14ced3418542ae597b02ca49fa27c11502f4a4f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![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> {
    //~^ ERROR non-defining opaque type use
    t
    //~^ ERROR non-defining opaque type use
}