about summary refs log tree commit diff
path: root/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs
blob: 39e4912ae3af60ef4f6f80a3bd0bdb9bfc362d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(type_alias_impl_trait)]

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

#[define_opaque(Foo)]
fn foo<'x, 'y>(i: &'x i32, j: &'y i32) -> (Foo<'x, 'y>, Foo<'y, 'x>) {
    (i, j)
    //~^ ERROR opaque type used twice with different lifetimes
}

fn main() {}