Skip to content

Commit 66e0266

Browse files
committed
rewrite the test to workaround #51525
1 parent 769b1cf commit 66e0266

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/test/ui/impl-trait/bound-normalization-pass.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,18 @@ mod lifetimes {
4343
}
4444

4545
/// Like above.
46-
fn foo2_pass<'a, T: Trait<'a, Assoc=()> + 'a>() -> impl FooLike<Output=T::Assoc> + 'a {
46+
///
47+
/// FIXME(#51525) -- the shorter notation `T::Assoc` winds up referencing `'static` here
48+
fn foo2_pass<'a, T: Trait<'a, Assoc=()> + 'a>(
49+
) -> impl FooLike<Output=<T as Trait<'a>>::Assoc> + 'a {
4750
Foo(())
4851
}
4952

5053
/// Normalization to type containing bound region.
51-
fn foo2_pass2<'a, T: Trait<'a, Assoc=&'a ()> + 'a>() -> impl FooLike<Output=T::Assoc> + 'a {
54+
///
55+
/// FIXME(#51525) -- the shorter notation `T::Assoc` winds up referencing `'static` here
56+
fn foo2_pass2<'a, T: Trait<'a, Assoc=&'a ()> + 'a>(
57+
) -> impl FooLike<Output=<T as Trait<'a>>::Assoc> + 'a {
5258
Foo(&())
5359
}
5460
}

0 commit comments

Comments
 (0)