Also add label with original type for function pointers

This commit is contained in:
Urgau
2023-08-03 10:57:11 +02:00
parent 4b3dadbe5a
commit ee519532f6
4 changed files with 40 additions and 13 deletions

View File

@@ -618,7 +618,11 @@ pub struct ExpectationNote {
pub enum PtrNullChecksDiag<'a> {
#[diag(lint_ptr_null_checks_fn_ptr)]
#[help(lint_help)]
FnPtr,
FnPtr {
orig_ty: Ty<'a>,
#[label]
label: Span,
},
#[diag(lint_ptr_null_checks_ref)]
Ref {
orig_ty: Ty<'a>,