1 // Test that we are able to establish that `<T as
2 // MyTrait<'a>>::Output` outlives `'b` here. We need to prove however
3 // that `<T as MyTrait<'a>>::Output` outlives `'a`, so we also have to
4 // prove that `'b: 'a`.
10 fn foo1<'a, 'b, T>() -> &'a ()
13 <T as MyTrait<'a>>::Output: 'b,
15 bar::<T::Output>() //~ ERROR may not live long enough
18 fn foo2<'a, 'b, T>() -> &'a ()
21 <T as MyTrait<'a>>::Output: 'b,
24 bar::<T::Output>() // OK
27 fn bar<'a, T>() -> &'a ()