about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-09-25 11:32:58 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-09-26 09:38:26 -0400
commite2deef32d4a2f07249c567534528d5264ba0a160 (patch)
tree763f4c5b010655aa5f3f8a582dae53bcdb3ddd29
parentffe87f63eada242a94a762c4304b9fe059310289 (diff)
downloadrust-e2deef32d4a2f07249c567534528d5264ba0a160.tar.gz
rust-e2deef32d4a2f07249c567534528d5264ba0a160.zip
pacify the mercilous tidy.
-rw-r--r--src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr11
-rw-r--r--src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs3
-rw-r--r--src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr4
3 files changed, 15 insertions, 3 deletions
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
index 00000000000..1e953ecff69
--- /dev/null
+++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.nll.stderr
@@ -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`.
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs
index 07cc37a8b29..9e3590ca715 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs
+++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs
@@ -11,7 +11,8 @@ where
     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 ()
diff --git a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
index c6d0037138c..d6ade2a603e 100644
--- a/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
+++ b/src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.stderr
@@ -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