Skip to content

Commit f99a07d

Browse files
Rollup merge of rust-lang#42415 - stephen-lazaro:Issue29094, r=arielb1
Remove 'elided' from lifetime resolution error Removes 'elided' from lifetime resolution errors Removes 'elided' from relevant error messaging tests This PR resolves rust-lang#29094 r? @Mark-Simulacrum
2 parents 6836562 + 7ed771f commit f99a07d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Diff for: src/librustc/middle/resolve_lifetime.rs

+1-1
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

Diff for: src/test/compile-fail/issue-26638.rs

+1-1
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]

Diff for: src/test/compile-fail/issue-30255.rs

+3-3
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

Diff for: src/test/compile-fail/lifetime-elision-return-type-requires-explicit-lifetime.rs

+1-1
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)