]> git.lizzy.rs Git - rust.git/commitdiff
Remove 'elided' from lifetime resolution error
authorStephen Lazaro <stephen@earnest.com>
Sat, 3 Jun 2017 19:14:42 +0000 (12:14 -0700)
committerStephen Lazaro <stephen@earnest.com>
Sat, 3 Jun 2017 19:14:42 +0000 (12:14 -0700)
Removes 'elided' from lifetime resolution errors
Removes 'elided' from relevant error messaging tests

src/librustc/middle/resolve_lifetime.rs
src/test/compile-fail/issue-26638.rs
src/test/compile-fail/issue-30255.rs
src/test/compile-fail/lifetime-elision-return-type-requires-explicit-lifetime.rs

index 1a07423bcbc0f88d44224be61db72b5b53a53d92..ce5d58f5800c788c413d98bd42e087e72ec086c4 100644 (file)
@@ -1363,7 +1363,7 @@ fn report_elision_failure(&mut self,
             m.push_str(&(if n == 1 {
                 help_name
             } else {
-                format!("one of {}'s {} elided {}lifetimes", help_name, n,
+                format!("one of {}'s {} {}lifetimes", help_name, n,
                         if have_bound_regions { "free " } else { "" } )
             })[..]);
 
index f918f0aed7a1098cdab57754bbed8b2a69a1df47..9b8c7b250763ef100c3cda9fa2e1f2d55b05bc1f 100644 (file)
@@ -10,7 +10,7 @@
 
 fn parse_type(iter: Box<Iterator<Item=&str>+'static>) -> &str { iter.next() }
 //~^ ERROR missing lifetime specifier [E0106]
-//~^^ HELP 2 elided lifetimes
+//~^^ HELP 2 lifetimes
 
 fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
 //~^ ERROR missing lifetime specifier [E0106]
index 1daa6a61f777ca5b183eccbbbae0591b0bb59c6c..e3f55ae51e8b65f28e98459167ecb378107a9a6c 100644 (file)
@@ -17,19 +17,19 @@ struct S<'a> {
 
 fn f(a: &S, b: i32) -> &i32 {
 //~^ ERROR missing lifetime specifier [E0106]
-//~^^ HELP does not say which one of `a`'s 2 elided lifetimes it is borrowed from
+//~^^ HELP does not say which one of `a`'s 2 lifetimes it is borrowed from
     panic!();
 }
 
 fn g(a: &S, b: bool, c: &i32) -> &i32 {
 //~^ ERROR missing lifetime specifier [E0106]
-//~^^ HELP does not say whether it is borrowed from one of `a`'s 2 elided lifetimes or `c`
+//~^^ HELP does not say whether it is borrowed from one of `a`'s 2 lifetimes or `c`
     panic!();
 }
 
 fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 {
 //~^ ERROR missing lifetime specifier [E0106]
-//~^^ HELP does not say whether it is borrowed from `a`, one of `c`'s 2 elided lifetimes, or `d`
+//~^^ HELP does not say whether it is borrowed from `a`, one of `c`'s 2 lifetimes, or `d`
     panic!();
 }
 
index 43371eb6340f434d89aa8b903fe5cf4e463586ef..2d9de57a2659f52b8b59c6cdfe51637b7b178826 100644 (file)
@@ -28,7 +28,7 @@ struct Foo<'a> {
 // Lifetime annotation needed because we have two lifetimes: one as a parameter
 // and one on the reference.
 fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier
-//~^ HELP the signature does not say which one of `_x`'s 2 elided lifetimes it is borrowed from
+//~^ HELP the signature does not say which one of `_x`'s 2 lifetimes it is borrowed from
     panic!()
 }