1
Fork 0

Uplift clippy::fn_null_check to rustc

This commit is contained in:
Urgau 2023-05-17 11:22:26 +02:00
parent 1e377c16fe
commit f6d2bf63d3
6 changed files with 221 additions and 0 deletions

View file

@ -215,6 +215,9 @@ lint_expectation = this lint expectation is unfulfilled
.note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message
.rationale = {$rationale}
lint_fn_null_check = function pointers are not nullable, so checking them for null will always return false
.help = wrap the function pointer inside an `Option` and use `Option::is_none` to check for null pointer value
lint_for_loops_over_fallibles =
for loop over {$article} `{$ty}`. This is more readably written as an `if let` statement
.suggestion = consider using `if let` to clear intent