Skip to content

Commit

Permalink
rewrite the test to workaround #51525
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 9, 2019
1 parent 769b1cf commit 66e0266
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/test/ui/impl-trait/bound-normalization-pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(&())
}
}
Expand Down

0 comments on commit 66e0266

Please sign in to comment.