Skip to content

Commit f923476

Browse files
committed
review comments
1 parent 795d307 commit f923476

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc/middle/resolve_lifetime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,7 @@ fn add_missing_lifetime_specifiers_label(
29122912
) {
29132913
err.span_suggestion(
29142914
span,
2915-
&format!("consider using the named lifetime `{}`", name),
2915+
"consider using the named lifetime",
29162916
format!("&{} ", name),
29172917
Applicability::MaybeIncorrect,
29182918
);

src/test/ui/suggestions/return-without-lifetime.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ error[E0106]: missing lifetime specifier
22
--> $DIR/return-without-lifetime.rs:3:34
33
|
44
LL | fn func1<'a>(_arg: &'a Thing) -> &() { unimplemented!() }
5-
| ^ help: consider using the named lifetime `'a`: `&'a`
5+
| ^ help: consider using the named lifetime: `&'a`
66
|
77
= 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
88

99
error[E0106]: missing lifetime specifier
1010
--> $DIR/return-without-lifetime.rs:5:35
1111
|
1212
LL | fn func2<'a>(_arg: &Thing<'a>) -> &() { unimplemented!() }
13-
| ^ help: consider using the named lifetime `'a`: `&'a`
13+
| ^ help: consider using the named lifetime: `&'a`
1414
|
1515
= 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
1616

0 commit comments

Comments
 (0)