Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Mar 12, 2019
1 parent 795d307 commit f923476
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc/middle/resolve_lifetime.rs
Expand Up @@ -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,
);
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/suggestions/return-without-lifetime.stderr
Expand Up @@ -2,15 +2,15 @@ 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

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

Expand Down

0 comments on commit f923476

Please sign in to comment.