]> git.lizzy.rs Git - rust.git/commitdiff
review comments
authorEsteban Küber <esteban@kuber.com.ar>
Tue, 12 Mar 2019 22:34:16 +0000 (15:34 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Tue, 12 Mar 2019 22:34:16 +0000 (15:34 -0700)
src/librustc/middle/resolve_lifetime.rs
src/test/ui/suggestions/return-without-lifetime.stderr

index 35bca04d1e623ed3e2888cf071ceb27de5f7ec00..d03268df5e148541eb076eb18b60916deba4b2bf 100644 (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,
         );
index 72f1c142d028f9ea25b9603348064ee3d1582dfc..1ffe91bce05a59846778efca7b733dcd73dbfbd4 100644 (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