about summary refs log tree commit diff
path: root/clippy_lints/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-08-03 17:29:06 +0200
committerGitHub <noreply@github.com>2023-08-03 17:29:06 +0200
commit8f4f476a54fc12eec0c969ac65086976fcd7d318 (patch)
treeaa2c0e33fff5491bdff7be8aed12f7113781618c /clippy_lints/src
parentff27f9095f5edebdd03e885cb4df74ad32df30dc (diff)
parent7ef1a54ffeefc3f3e8e18afc2dbb9ed21b890d8e (diff)
downloadrust-8f4f476a54fc12eec0c969ac65086976fcd7d318.tar.gz
rust-8f4f476a54fc12eec0c969ac65086976fcd7d318.zip
Rollup merge of #113657 - Urgau:expand-incorrect_fn_null_check-lint, r=cjgillot
Expand, rename and improve `incorrect_fn_null_checks` lint

This PR,

 - firstly, expand the lint by now linting on references
 - secondly, it renames the lint `incorrect_fn_null_checks` -> `useless_ptr_null_checks`
 - and thirdly it improves the lint by catching `ptr::from_mut`, `ptr::from_ref`, as well as `<*mut _>::cast` and `<*const _>::cast_mut`

Fixes https://github.com/rust-lang/rust/issues/113601
cc ```@est31```
Diffstat (limited to 'clippy_lints/src')
-rw-r--r--clippy_lints/src/renamed_lints.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/renamed_lints.rs b/clippy_lints/src/renamed_lints.rs
index 49bdc679604..fc1fabcc0ae 100644
--- a/clippy_lints/src/renamed_lints.rs
+++ b/clippy_lints/src/renamed_lints.rs
@@ -43,7 +43,7 @@ pub static RENAMED_LINTS: &[(&str, &str)] = &[
     ("clippy::for_loops_over_fallibles", "for_loops_over_fallibles"),
     ("clippy::forget_copy", "forgetting_copy_types"),
     ("clippy::forget_ref", "forgetting_references"),
-    ("clippy::fn_null_check", "incorrect_fn_null_checks"),
+    ("clippy::fn_null_check", "useless_ptr_null_checks"),
     ("clippy::into_iter_on_array", "array_into_iter"),
     ("clippy::invalid_atomic_ordering", "invalid_atomic_ordering"),
     ("clippy::invalid_ref", "invalid_value"),