]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/different_lifetimes_defining_uses.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / different_lifetimes_defining_uses.rs
1 #![feature(type_alias_impl_trait)]
2 #![allow(dead_code)]
3
4 type OneLifetime<'a, 'b> = impl std::fmt::Debug;
5
6 fn foo<'a, 'b>(a: &'a u32, b: &'b u32) -> OneLifetime<'a, 'b> {
7     a
8 }
9
10 fn bar<'a, 'b>(a: &'a u32, b: &'b u32) -> OneLifetime<'a, 'b> {
11     b
12     //~^ ERROR: concrete type differs from previous defining opaque type use
13 }
14
15 fn main() {}