1
Fork 0

Change lint_dropping_copy_types to use UseLetUnderscoreIgnoreSuggestion as suggestion.

This commit is contained in:
surechen 2024-05-29 18:09:20 +08:00
parent ac736d6d88
commit 9d1ed80a8a
3 changed files with 8 additions and 33 deletions

View file

@ -691,20 +691,7 @@ pub struct DropCopyDiag<'a> {
#[label]
pub label: Span,
#[subdiagnostic]
pub sugg: DropCopySuggestion,
}
#[derive(Subdiagnostic)]
pub enum DropCopySuggestion {
#[note(lint_note)]
Note,
#[multipart_suggestion(lint_suggestion, style = "verbose", applicability = "maybe-incorrect")]
Suggestion {
#[suggestion_part(code = "let _ = ")]
start_span: Span,
#[suggestion_part(code = "")]
end_span: Span,
},
pub sugg: UseLetUnderscoreIgnoreSuggestion,
}
#[derive(LintDiagnostic)]