parent
9f432d7b44
commit
09c8e39adb
11 changed files with 169 additions and 11 deletions
|
@ -669,11 +669,25 @@ pub struct DropRefDiag<'a> {
|
|||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_dropping_copy_types)]
|
||||
#[note]
|
||||
pub struct DropCopyDiag<'a> {
|
||||
pub arg_ty: Ty<'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,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue