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:
parent
037f515caf
commit
aef18c9bfb
2 changed files with 3 additions and 3 deletions
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue