a5245b5894
Suggest using `ptr::null_mut` when user provided `ptr::null` to a function expecting `ptr::null_mut` ``` error[E0308]: mismatched types --> $DIR/ptr-null-mutability-suggestions.rs:9:24 | LL | expecting_null_mut(ptr::null()); | ------------------ ^^^^^^^^^^^ | | | | | types differ in mutability | | help: consider using `core::ptr::null_mut` instead: `core::ptr::null_mut()` | arguments to this function are incorrect | = note: expected raw pointer `*mut u8` found raw pointer `*const _` note: function defined here --> $DIR/ptr-null-mutability-suggestions.rs:6:4 | LL | fn expecting_null_mut(_: *mut u8) {} | ^^^^^^^^^^^^^^^^^^ ---------- ``` Closes #85184.