Key changes include: - Removal of the word "syntax" from the lint message. More accurately, it could have been something like "syntax group" or "syntax category", but avoiding it completely is easier. - The primary lint message now reflects exactly which mismatch is occurring, instead of trying to be general. A new `help` line is general across the mismatch kinds. - Suggestions have been reduced to be more minimal, no longer also changing non-idiomatic but unrelated aspects. - Suggestion text no longer mentions changes when those changes don't occur in that specific suggestion.
32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
warning: eliding a lifetime that's named elsewhere is confusing
|
|
--> $DIR/self_lifetime-async.rs:6:29
|
|
|
|
|
LL | async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
|
|
| ^^ --- the same lifetime is elided here
|
|
| |
|
|
| the lifetime is named here
|
|
|
|
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
|
|
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
|
|
help: consistently use `'b`
|
|
|
|
|
LL | async fn foo<'b>(self: &'b Foo<'a>) -> &'b () { self.0 }
|
|
| ++
|
|
|
|
warning: eliding a lifetime that's named elsewhere is confusing
|
|
--> $DIR/self_lifetime-async.rs:12:42
|
|
|
|
|
LL | async fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
|
|
| ^^ --- the same lifetime is elided here
|
|
| |
|
|
| the lifetime is named here
|
|
|
|
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
|
|
help: consistently use `'a`
|
|
|
|
|
LL | async fn bar<'a>(self: &Alias, arg: &'a ()) -> &'a () { arg }
|
|
| ++
|
|
|
|
warning: 2 warnings emitted
|
|
|