about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorGuillaume Boisseau <Nadrieril@users.noreply.github.com>2024-02-07 18:24:42 +0100
committerGitHub <noreply@github.com>2024-02-07 18:24:42 +0100
commitf5a36cbd73343516b490bbcaaaec03384ef2cf93 (patch)
tree7a3edb88f491b73f80266dfa9f38501a1f746016 /compiler/rustc_passes/src
parent65c09546ace9f39a53685cbc20ff0cbb41f5d481 (diff)
parentaef18c9bfb8c7844b95f6d950133f61b0fa2158b (diff)
downloadrust-f5a36cbd73343516b490bbcaaaec03384ef2cf93.tar.gz
rust-f5a36cbd73343516b490bbcaaaec03384ef2cf93.zip
Rollup merge of #120470 - estebank:issue-54196, r=compiler-errors
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.
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/errors.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs
index 6a499a98681..61c953bcb59 100644
--- a/compiler/rustc_passes/src/errors.rs
+++ b/compiler/rustc_passes/src/errors.rs
@@ -1732,7 +1732,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>,
@@ -1771,7 +1771,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>,