summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs
blob: 65eb2952e0ff01e1cf6e0b2bf788a6abbc61c456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(type_alias_impl_trait)]

pub trait Captures<'a> {}

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

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

fn foo<'x, 'y>(i: &'x i32, j: &'y i32) -> (Foo<'x, 'y>, Foo<'y, 'x>) {
    (i, i) //~ ERROR concrete type differs from previous
}

fn main() {}