]> git.lizzy.rs Git - rust.git/commitdiff
rewrite the test to workaround #51525
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 9 Jul 2019 10:57:52 +0000 (06:57 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Tue, 9 Jul 2019 10:57:52 +0000 (06:57 -0400)
src/test/ui/impl-trait/bound-normalization-pass.rs

index 1c7e776a4798a2d64ec9c928c973e8961a91023b..3fdd7c0ecb6665bdffbbb9f5525a1dd30ac4a8ce 100644 (file)
@@ -43,12 +43,18 @@ trait Trait<'a> {
     }
 
     /// 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(&())
     }
 }