diff options
| author | Jubilee <workingjubilee@gmail.com> | 2025-06-24 19:45:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-24 19:45:35 -0700 |
| commit | ced61092ac6a49434b28c1656f53ec9f059d83f8 (patch) | |
| tree | 88002ffb93cf185b68522ff14eb9571f1a8b4051 | |
| parent | c3816350ef6f66476639bba5859111144a0d70bf (diff) | |
| parent | 46e9d2f9fc065e33cc54ccfa0e0e3c34376ebeaa (diff) | |
| download | rust-ced61092ac6a49434b28c1656f53ec9f059d83f8.tar.gz rust-ced61092ac6a49434b28c1656f53ec9f059d83f8.zip | |
Rollup merge of #142980 - shepmaster:mismatched-syntaxes-multi-suggestions, r=ehuss
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 rust-lang/rust#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. r? `@ehuss`
| -rw-r--r-- | compiler/rustc_lint/src/lints.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index 4d405d915fb..eedb897312e 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -3278,7 +3278,7 @@ impl Subdiagnostic for MismatchedLifetimeSyntaxesSuggestion { diag.multipart_suggestion_with_style( fluent::lint_mismatched_lifetime_syntaxes_suggestion_implicit, suggestions, - Applicability::MachineApplicable, + Applicability::MaybeIncorrect, style(tool_only), ); } @@ -3293,7 +3293,7 @@ impl Subdiagnostic for MismatchedLifetimeSyntaxesSuggestion { diag.multipart_suggestion_with_style( fluent::lint_mismatched_lifetime_syntaxes_suggestion_mixed, suggestions, - Applicability::MachineApplicable, + Applicability::MaybeIncorrect, style(tool_only), ); } @@ -3308,7 +3308,7 @@ impl Subdiagnostic for MismatchedLifetimeSyntaxesSuggestion { diag.multipart_suggestion_with_style( msg, suggestions, - Applicability::MachineApplicable, + Applicability::MaybeIncorrect, style(tool_only), ); } |
