Expand incorrect_fn_null_check lint with reference null checking
This commit is contained in:
parent
c435af0d5c
commit
743ae5a2eb
5 changed files with 133 additions and 23 deletions
|
@ -615,9 +615,17 @@ pub struct ExpectationNote {
|
|||
|
||||
// fn_null_check.rs
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(lint_fn_null_check)]
|
||||
#[help]
|
||||
pub struct FnNullCheckDiag;
|
||||
pub enum FnNullCheckDiag<'a> {
|
||||
#[diag(lint_fn_null_check_fn_ptr)]
|
||||
#[help(lint_help)]
|
||||
FnPtr,
|
||||
#[diag(lint_fn_null_check_ref)]
|
||||
Ref {
|
||||
orig_ty: Ty<'a>,
|
||||
#[label]
|
||||
label: Span,
|
||||
},
|
||||
}
|
||||
|
||||
// for_loops_over_fallibles.rs
|
||||
#[derive(LintDiagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue