Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 46e9d2f

Browse files
Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect
`cargo fix` does not have a way of distinguishing a suggestion with multiple spans which should all be applied from multiple suggestions where only one should be applied (see issue 53934). `cargo fix` only works with `MachineApplicable` suggestions, so downgrading the applicability will stop `cargo` from suggesting the user run `cargo fix`. rust-analyzer does work with `MaybeIncorrect`, so interactive fixes are still available.
1 parent 36b2163 commit 46e9d2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎compiler/rustc_lint/src/lints.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,7 +3261,7 @@ impl Subdiagnostic for MismatchedLifetimeSyntaxesSuggestion {
32613261
diag.multipart_suggestion_with_style(
32623262
fluent::lint_mismatched_lifetime_syntaxes_suggestion_implicit,
32633263
suggestions,
3264-
Applicability::MachineApplicable,
3264+
Applicability::MaybeIncorrect,
32653265
style(tool_only),
32663266
);
32673267
}
@@ -3276,7 +3276,7 @@ impl Subdiagnostic for MismatchedLifetimeSyntaxesSuggestion {
32763276
diag.multipart_suggestion_with_style(
32773277
fluent::lint_mismatched_lifetime_syntaxes_suggestion_mixed,
32783278
suggestions,
3279-
Applicability::MachineApplicable,
3279+
Applicability::MaybeIncorrect,
32803280
style(tool_only),
32813281
);
32823282
}
@@ -3291,7 +3291,7 @@ impl Subdiagnostic for MismatchedLifetimeSyntaxesSuggestion {
32913291
diag.multipart_suggestion_with_style(
32923292
msg,
32933293
suggestions,
3294-
Applicability::MachineApplicable,
3294+
Applicability::MaybeIncorrect,
32953295
style(tool_only),
32963296
);
32973297
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /