about summary refs log tree commit diff
path: root/src/test/compile-fail/lifetime-inference-give-expl-lifetime-param.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-03-18 14:47:40 -0400
committerNiko Matsakis <niko@alum.mit.edu>2016-03-18 16:38:52 -0400
commitbca07b5ebb59738ef64cd5891507a06c7002dd26 (patch)
tree0817bfe3aece0837934813133eba9a8cb43158c7 /src/test/compile-fail/lifetime-inference-give-expl-lifetime-param.rs
parent5abacd36f0149a9106d7ee04e97eadba4e523bb4 (diff)
downloadrust-bca07b5ebb59738ef64cd5891507a06c7002dd26.tar.gz
rust-bca07b5ebb59738ef64cd5891507a06c7002dd26.zip
make suggestion stuff not swallow errors
The older code would sometimes swallow errors or fail to produce a
suggestion. The newer code does not. However, just printing everything
would produce a bunch of new and kind of annoying errors, so continue
to swallow `T: 'a` errors so long as there are other things to show.
Diffstat (limited to 'src/test/compile-fail/lifetime-inference-give-expl-lifetime-param.rs')
-rw-r--r--src/test/compile-fail/lifetime-inference-give-expl-lifetime-param.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/compile-fail/lifetime-inference-give-expl-lifetime-param.rs b/src/test/compile-fail/lifetime-inference-give-expl-lifetime-param.rs
index 46160fbefcf..73d89beb220 100644
--- a/src/test/compile-fail/lifetime-inference-give-expl-lifetime-param.rs
+++ b/src/test/compile-fail/lifetime-inference-give-expl-lifetime-param.rs
@@ -39,6 +39,7 @@ struct Cat<'x, T> { cat: &'x isize, t: T }
 struct Dog<'y> { dog: &'y isize }
 
 fn cat2<'x, 'y>(x: Cat<'x, Dog<'y>>) -> &'x isize {
+    //~^ HELP consider using an explicit lifetime parameter as shown: fn cat2<'x>(x: Cat<'x, Dog<'x>>) -> &'x isize
     x.t.dog //~ ERROR E0312
 }
 
@@ -48,6 +49,7 @@ struct Baz<'x> {
 
 impl<'a> Baz<'a> {
     fn baz2<'b>(&self, x: &isize) -> (&'b isize, &'b isize) {
+        //~^ HELP consider using an explicit lifetime parameter as shown: fn baz2<'b>(&self, x: &'b isize) -> (&'a isize, &'a isize)
         (self.bar, x) //~ ERROR E0312
         //~^ ERROR E0312
     }