diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-04-16 21:33:42 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-04-22 12:12:33 -0700 |
| commit | 13c1daeb2f626b3923f7574226a089d95c8c7772 (patch) | |
| tree | b6bf9fcb96ecab3b859bd8c1f85cfd34775becf4 /src/test/ui/underscore-lifetime | |
| parent | 82e90d64266b8a4b53935d629786e69610b33f25 (diff) | |
| download | rust-13c1daeb2f626b3923f7574226a089d95c8c7772.tar.gz rust-13c1daeb2f626b3923f7574226a089d95c8c7772.zip | |
Tweak `'static` suggestion code
Fix #71196.
Diffstat (limited to 'src/test/ui/underscore-lifetime')
| -rw-r--r-- | src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr index ada4551baef..ffccd100cb0 100644 --- a/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr +++ b/src/test/ui/underscore-lifetime/underscore-lifetime-binders.stderr @@ -14,15 +14,24 @@ error[E0106]: missing lifetime specifier --> $DIR/underscore-lifetime-binders.rs:2:17 | LL | struct Baz<'a>(&'_ &'a u8); - | ^^ help: consider using the named lifetime: `'a` + | ^^ expected named lifetime parameter + | +help: consider using the named lifetime + | +LL | struct Baz<'a>(&'a &'a u8); + | ^^ error[E0106]: missing lifetime specifier --> $DIR/underscore-lifetime-binders.rs:10:33 | LL | fn meh() -> Box<dyn for<'_> Meh<'_>> - | ^^ help: consider giving it a 'static lifetime: `'static` + | ^^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the named lifetime + | +LL | fn meh() -> Box<dyn for<'_> Meh<'static>> + | ^^^^^^^ error[E0106]: missing lifetime specifier --> $DIR/underscore-lifetime-binders.rs:16:35 |
