mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
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.
(cherry picked from commit 46e9d2f9fc)
This commit is contained in:
committed by
Josh Stone
parent
cd3bc5f082
commit
736f54bb35
@@ -3261,7 +3261,7 @@ fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
|
||||
diag.multipart_suggestion_with_style(
|
||||
fluent::lint_mismatched_lifetime_syntaxes_suggestion_implicit,
|
||||
suggestions,
|
||||
Applicability::MachineApplicable,
|
||||
Applicability::MaybeIncorrect,
|
||||
style(tool_only),
|
||||
);
|
||||
}
|
||||
@@ -3276,7 +3276,7 @@ fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
|
||||
diag.multipart_suggestion_with_style(
|
||||
fluent::lint_mismatched_lifetime_syntaxes_suggestion_mixed,
|
||||
suggestions,
|
||||
Applicability::MachineApplicable,
|
||||
Applicability::MaybeIncorrect,
|
||||
style(tool_only),
|
||||
);
|
||||
}
|
||||
@@ -3291,7 +3291,7 @@ fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
|
||||
diag.multipart_suggestion_with_style(
|
||||
msg,
|
||||
suggestions,
|
||||
Applicability::MachineApplicable,
|
||||
Applicability::MaybeIncorrect,
|
||||
style(tool_only),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user