1
Fork 0

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:
Guillaume Boisseau 2024-02-07 18:24:42 +01:00 committed by GitHub
commit f5a36cbd73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -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>,