Skip to content

Commit 85ae646

Browse files
committed
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 rust-lang#54196.
1 parent fb4bca0 commit 85ae646

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_passes/src/errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1739,7 +1739,7 @@ pub struct UnusedVariableTryPrefix {
17391739

17401740
#[derive(Subdiagnostic)]
17411741
pub enum UnusedVariableSugg {
1742-
#[multipart_suggestion(passes_suggestion, applicability = "machine-applicable")]
1742+
#[multipart_suggestion(passes_suggestion, applicability = "maybe-incorrect")]
17431743
TryPrefixSugg {
17441744
#[suggestion_part(code = "_{name}")]
17451745
spans: Vec<Span>,
@@ -1778,7 +1778,7 @@ pub struct UnusedVarTryIgnore {
17781778
}
17791779

17801780
#[derive(Subdiagnostic)]
1781-
#[multipart_suggestion(passes_suggestion, applicability = "machine-applicable")]
1781+
#[multipart_suggestion(passes_suggestion, applicability = "maybe-incorrect")]
17821782
pub struct UnusedVarTryIgnoreSugg {
17831783
#[suggestion_part(code = "{name}: _")]
17841784
pub shorthands: Vec<Span>,

0 commit comments

Comments
 (0)