Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7ed771f

Browse files
committedJun 3, 2017
Remove 'elided' from lifetime resolution error
Removes 'elided' from lifetime resolution errors Removes 'elided' from relevant error messaging tests
1 parent 4225019 commit 7ed771f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

‎src/librustc/middle/resolve_lifetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
13631363
m.push_str(&(if n == 1 {
13641364
help_name
13651365
} else {
1366-
format!("one of {}'s {} elided {}lifetimes", help_name, n,
1366+
format!("one of {}'s {} {}lifetimes", help_name, n,
13671367
if have_bound_regions { "free " } else { "" } )
13681368
})[..]);
13691369

‎src/test/compile-fail/issue-26638.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
fn parse_type(iter: Box<Iterator<Item=&str>+'static>) -> &str { iter.next() }
1212
//~^ ERROR missing lifetime specifier [E0106]
13-
//~^^ HELP 2 elided lifetimes
13+
//~^^ HELP 2 lifetimes
1414

1515
fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
1616
//~^ ERROR missing lifetime specifier [E0106]

‎src/test/compile-fail/issue-30255.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ struct S<'a> {
1717

1818
fn f(a: &S, b: i32) -> &i32 {
1919
//~^ ERROR missing lifetime specifier [E0106]
20-
//~^^ HELP does not say which one of `a`'s 2 elided lifetimes it is borrowed from
20+
//~^^ HELP does not say which one of `a`'s 2 lifetimes it is borrowed from
2121
panic!();
2222
}
2323

2424
fn g(a: &S, b: bool, c: &i32) -> &i32 {
2525
//~^ ERROR missing lifetime specifier [E0106]
26-
//~^^ HELP does not say whether it is borrowed from one of `a`'s 2 elided lifetimes or `c`
26+
//~^^ HELP does not say whether it is borrowed from one of `a`'s 2 lifetimes or `c`
2727
panic!();
2828
}
2929

3030
fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 {
3131
//~^ ERROR missing lifetime specifier [E0106]
32-
//~^^ HELP does not say whether it is borrowed from `a`, one of `c`'s 2 elided lifetimes, or `d`
32+
//~^^ HELP does not say whether it is borrowed from `a`, one of `c`'s 2 lifetimes, or `d`
3333
panic!();
3434
}
3535

‎src/test/compile-fail/lifetime-elision-return-type-requires-explicit-lifetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct Foo<'a> {
2828
// Lifetime annotation needed because we have two lifetimes: one as a parameter
2929
// and one on the reference.
3030
fn h(_x: &Foo) -> &isize { //~ ERROR missing lifetime specifier
31-
//~^ HELP the signature does not say which one of `_x`'s 2 elided lifetimes it is borrowed from
31+
//~^ HELP the signature does not say which one of `_x`'s 2 lifetimes it is borrowed from
3232
panic!()
3333
}
3434

0 commit comments

Comments
 (0)
Please sign in to comment.