1
Fork 0

Mark "unused binding" suggestion as maybe incorrect

Ignoring unused bindings should be a determination made by a human, `rustfix` shouldn't auto-apply the suggested change.

Fix #54196.
This commit is contained in:
Esteban Küber 2024-01-29 18:54:29 +00:00
parent 037f515caf
commit aef18c9bfb
2 changed files with 3 additions and 3 deletions

View file

@ -1739,7 +1739,7 @@ pub struct UnusedVariableTryPrefix {
#[derive(Subdiagnostic)]
pub enum UnusedVariableSugg {
#[multipart_suggestion(passes_suggestion, applicability = "machine-applicable")]
#[multipart_suggestion(passes_suggestion, applicability = "maybe-incorrect")]
TryPrefixSugg {
#[suggestion_part(code = "_{name}")]
spans: Vec<Span>,
@ -1778,7 +1778,7 @@ pub struct UnusedVarTryIgnore {
}
#[derive(Subdiagnostic)]
#[multipart_suggestion(passes_suggestion, applicability = "machine-applicable")]
#[multipart_suggestion(passes_suggestion, applicability = "maybe-incorrect")]
pub struct UnusedVarTryIgnoreSugg {
#[suggestion_part(code = "{name}: _")]
pub shorthands: Vec<Span>,