4 #![feature(type_alias_impl_trait)]
6 impl<T> Trait<'_, '_> for T {}
8 // Here we wind up selecting `'a` and `'b` in the hidden type because
9 // those are the types that appear in the original values.
11 type Foo<'a, 'b> = impl Trait<'a, 'b>;
13 fn upper_bounds<'a, 'b>(a: &'a u8, b: &'b u8) -> Foo<'a, 'b> {
14 // In this simple case, you have a hidden type `(&'0 u8, &'1 u8)` and constraints like
23 // We use the fact that `'a: 0'` must hold (combined with the in
24 // constraint) to determine that `'0 = 'a` must be the answer.