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.
This commit is contained in:
commit
f5a36cbd73
2 changed files with 3 additions and 3 deletions
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue