blob: 7c7d64a8cb4d3d379b812c5d107c05ac60fb1148 [file] [log] [blame]
#![feature(nll)]
// Test that we are able to establish that `<T as
// MyTrait<'a>>::Output: 'a` outlives `'a` (because the trait says
// so).
//
// compile-pass
trait MyTrait<'a> {
type Output: 'a;
}
fn foo<'a, T>() -> &'a ()
where
T: MyTrait<'a>,
{
bar::<T::Output>()
}
fn bar<'a, T>() -> &'a ()
where
T: 'a,
{
&()
}
fn main() {}