review comments

This commit is contained in:
Esteban Küber 2019-03-12 15:34:16 -07:00
parent 795d307f10
commit f9234767e4
2 changed files with 3 additions and 3 deletions

View file

@ -2912,7 +2912,7 @@ fn add_missing_lifetime_specifiers_label(
) {
err.span_suggestion(
span,
&format!("consider using the named lifetime `{}`", name),
"consider using the named lifetime",
format!("&{} ", name),
Applicability::MaybeIncorrect,
);

View file

@ -2,7 +2,7 @@ error[E0106]: missing lifetime specifier
--> $DIR/return-without-lifetime.rs:3:34
|
LL | fn func1<'a>(_arg: &'a Thing) -> &() { unimplemented!() }
| ^ help: consider using the named lifetime `'a`: `&'a`
| ^ help: consider using the named lifetime: `&'a`
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `_arg`'s 2 lifetimes it is borrowed from
@ -10,7 +10,7 @@ error[E0106]: missing lifetime specifier
--> $DIR/return-without-lifetime.rs:5:35
|
LL | fn func2<'a>(_arg: &Thing<'a>) -> &() { unimplemented!() }
| ^ help: consider using the named lifetime `'a`: `&'a`
| ^ help: consider using the named lifetime: `&'a`
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `_arg`'s 2 lifetimes it is borrowed from