]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/issue-86465.rs
Rollup merge of #106097 - mejrs:mir_build2, r=oli-obk
[rust.git] / tests / ui / impl-trait / issue-86465.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 X<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>;
8
9 fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) {
10     (a, a)
11     //~^ ERROR concrete type differs from previous defining opaque type use
12 }
13
14 fn main() {}