Skip to content
Permalink
Browse files

rewrite the test to workaround #51525

  • Loading branch information...
nikomatsakis committed Jul 9, 2019
1 parent 769b1cf commit 66e026666d82365db51c891816d58abd6f01b746
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/test/ui/impl-trait/bound-normalization-pass.rs
@@ -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(&())
}
}

0 comments on commit 66e0266

Please sign in to comment.
You can’t perform that action at this time.