error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:16:60 | LL | let _slice: &[usize] = core::slice::from_raw_parts(core::ptr::null(), 0); | ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` | = note: `#[deny(clippy::invalid_null_ptr_usage)]` on by default error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:18:60 | LL | let _slice: &[usize] = core::slice::from_raw_parts(core::ptr::null_mut(), 0); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:21:64 | LL | let _slice: &[usize] = core::slice::from_raw_parts_mut(core::ptr::null_mut(), 0); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:24:34 | LL | core::ptr::copy::(core::ptr::null(), core::ptr::NonNull::dangling().as_ptr(), 0); | ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:26:75 | LL | core::ptr::copy::(core::ptr::NonNull::dangling().as_ptr(), core::ptr::null_mut(), 0); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:29:49 | LL | core::ptr::copy_nonoverlapping::(core::ptr::null(), core::ptr::NonNull::dangling().as_ptr(), 0); | ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:31:90 | LL | core::ptr::copy_nonoverlapping::(core::ptr::NonNull::dangling().as_ptr(), core::ptr::null_mut(), 0); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:37:37 | LL | let _a: A = core::ptr::read(core::ptr::null()); | ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:39:37 | LL | let _a: A = core::ptr::read(core::ptr::null_mut()); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:42:47 | LL | let _a: A = core::ptr::read_unaligned(core::ptr::null()); | ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:44:47 | LL | let _a: A = core::ptr::read_unaligned(core::ptr::null_mut()); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:47:46 | LL | let _a: A = core::ptr::read_volatile(core::ptr::null()); | ^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:49:46 | LL | let _a: A = core::ptr::read_volatile(core::ptr::null_mut()); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:52:40 | LL | let _a: A = core::ptr::replace(core::ptr::null_mut(), A); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:57:30 | LL | core::ptr::swap::(core::ptr::null_mut(), &mut A); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:59:38 | LL | core::ptr::swap::(&mut A, core::ptr::null_mut()); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:62:45 | LL | core::ptr::swap_nonoverlapping::(core::ptr::null_mut(), &mut A, 0); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:64:53 | LL | core::ptr::swap_nonoverlapping::(&mut A, core::ptr::null_mut(), 0); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:67:26 | LL | core::ptr::write(core::ptr::null_mut(), A); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:70:36 | LL | core::ptr::write_unaligned(core::ptr::null_mut(), A); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:73:35 | LL | core::ptr::write_volatile(core::ptr::null_mut(), A); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: pointer must be non-null --> tests/ui/invalid_null_ptr_usage_no_std.rs:76:41 | LL | core::ptr::write_bytes::(core::ptr::null_mut(), 42, 0); | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `core::ptr::NonNull::dangling().as_ptr()` error: aborting due to 22 previous errors