rewrite the test to workaround #51525

This commit is contained in:
Niko Matsakis 2019-07-09 06:57:52 -04:00
parent 769b1cfd03
commit 66e026666d

View File

@ -43,12 +43,18 @@ mod lifetimes {
}
/// Like above.
fn foo2_pass<'a, T: Trait<'a, Assoc=()> + 'a>() -> impl FooLike<Output=T::Assoc> + 'a {
///
/// FIXME(#51525) -- the shorter notation `T::Assoc` winds up referencing `'static` here
fn foo2_pass<'a, T: Trait<'a, Assoc=()> + 'a>(
) -> impl FooLike<Output=<T as Trait<'a>>::Assoc> + 'a {
Foo(())
}
/// Normalization to type containing bound region.
fn foo2_pass2<'a, T: Trait<'a, Assoc=&'a ()> + 'a>() -> impl FooLike<Output=T::Assoc> + 'a {
///
/// FIXME(#51525) -- the shorter notation `T::Assoc` winds up referencing `'static` here
fn foo2_pass2<'a, T: Trait<'a, Assoc=&'a ()> + 'a>(
) -> impl FooLike<Output=<T as Trait<'a>>::Assoc> + 'a {
Foo(&())
}
}