Suggest 'r instead of 'lifetime
This commit is contained in:
parent
7e1464336a
commit
fa4594196d
19 changed files with 120 additions and 59 deletions
|
|
@ -6,8 +6,8 @@ LL | x: &bool,
|
|||
|
|
||||
help: consider introducing a named lifetime parameter
|
||||
|
|
||||
LL | struct Foo<'lifetime> {
|
||||
LL | x: &'lifetime bool,
|
||||
LL | struct Foo<'r> {
|
||||
LL | x: &'r bool,
|
||||
|
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
|
|
@ -18,9 +18,9 @@ LL | B(&bool),
|
|||
|
|
||||
help: consider introducing a named lifetime parameter
|
||||
|
|
||||
LL | enum Bar<'lifetime> {
|
||||
LL | enum Bar<'r> {
|
||||
LL | A(u8),
|
||||
LL | B(&'lifetime bool),
|
||||
LL | B(&'r bool),
|
||||
|
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
|
|
@ -31,8 +31,8 @@ LL | type MyStr = &str;
|
|||
|
|
||||
help: consider introducing a named lifetime parameter
|
||||
|
|
||||
LL | type MyStr<'lifetime> = &'lifetime str;
|
||||
| ^^^^^^^^^^^ ^^^^^^^^^^
|
||||
LL | type MyStr<'r> = &'r str;
|
||||
| ^^^^ ^^^
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/E0106.rs:17:10
|
||||
|
|
@ -42,8 +42,8 @@ LL | baz: Baz,
|
|||
|
|
||||
help: consider introducing a named lifetime parameter
|
||||
|
|
||||
LL | struct Quux<'lifetime> {
|
||||
LL | baz: Baz<'lifetime>,
|
||||
LL | struct Quux<'r> {
|
||||
LL | baz: Baz<'r>,
|
||||
|
|
||||
|
||||
error[E0106]: missing lifetime specifiers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue