3 // revisions: migrate mir
4 //[mir]compile-flags: -Z borrowck=mir
6 #![feature(member_constraints)]
7 #![feature(existential_type)]
9 trait Trait<'a, 'b> { }
10 impl<T> Trait<'_, '_> for T { }
12 // Here we wind up selecting `'a` and `'b` in the hidden type because
13 // those are the types that appear inth e original values.
15 existential type Foo<'a, 'b>: Trait<'a, 'b>;
17 fn upper_bounds<'a, 'b>(a: &'a u8, b: &'b u8) -> Foo<'a, 'b> {
18 // In this simple case, you have a hidden type `(&'0 u8, &'1 u8)` and constraints like
27 // We use the fact that `'a: 0'` must hold (combined with the in
28 // constraint) to determine that `'0 = 'a` must be the answer.