]> git.lizzy.rs Git - rust.git/commitdiff
pacify the mercilous tidy.
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 25 Sep 2018 15:32:58 +0000 (11:32 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 26 Sep 2018 13:38:26 +0000 (09:38 -0400)
src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr [new file with mode: 0644]
src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs
src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr

diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr
new file mode 100644 (file)
index 0000000..1e953ec
--- /dev/null
@@ -0,0 +1,11 @@
+error[E0309]: the associated type `<T as MyTrait<'_>>::Output` may not live long enough
+  --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5
+   |
+LL |     bar::<<T as MyTrait<'a>>::Output>()
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: consider adding an explicit lifetime bound `<T as MyTrait<'_>>::Output: 'a`...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0309`.
index 07cc37a8b290a435eb2e7ff88b13c9b69f25af5d..9e3590ca7154588a672a88c3a38ea69f1f6986f3 100644 (file)
@@ -11,7 +11,8 @@ fn foo1<'a, 'b, T>() -> &'a ()
     for<'x> T: MyTrait<'x>,
     <T as MyTrait<'b>>::Output: 'a,
 {
-    bar::<<T as MyTrait<'a>>::Output>() //~ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough
+    bar::<<T as MyTrait<'a>>::Output>()
+    //~^ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough
 }
 
 fn bar<'a, T>() -> &'a ()
index c6d0037138c42f9c19d687d737d78fc62e8b873e..d6ade2a603e82ad16128c2f620844d4a5c372147 100644 (file)
@@ -1,14 +1,14 @@
 error[E0309]: the associated type `<T as MyTrait<'a>>::Output` may not live long enough
   --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5
    |
-LL |     bar::<<T as MyTrait<'a>>::Output>() //~ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough
+LL |     bar::<<T as MyTrait<'a>>::Output>()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider adding an explicit lifetime bound `<T as MyTrait<'a>>::Output: 'a`...
 note: ...so that the type `<T as MyTrait<'a>>::Output` will meet its required lifetime bounds
   --> $DIR/projection-where-clause-env-wrong-lifetime.rs:14:5
    |
-LL |     bar::<<T as MyTrait<'a>>::Output>() //~ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough
+LL |     bar::<<T as MyTrait<'a>>::Output>()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error