Skip to content

Commit

Permalink
Mark "unused binding" suggestion as maybe incorrect
Browse files Browse the repository at this point in the history
Ignoring unused bindings should be a determination made by a human, `rustfix` shouldn't auto-apply the suggested change.

Fix rust-lang#54196.
  • Loading branch information
estebank committed Jan 30, 2024
1 parent fb4bca0 commit 85ae646
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_passes/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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>,
Expand Down

0 comments on commit 85ae646

Please sign in to comment.