]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / type-alias-impl-trait / multiple-def-uses-in-one-fn-lifetimes.rs
1 #![feature(type_alias_impl_trait)]
2
3 pub trait Captures<'a> {}
4
5 impl<'a, T: ?Sized> Captures<'a> for T {}
6
7 type Foo<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>;
8
9 fn foo<'x, 'y>(i: &'x i32, j: &'y i32) -> (Foo<'x, 'y>, Foo<'y, 'x>) {
10     (i, i) //~ ERROR concrete type differs from previous
11 }
12
13 fn main() {}