2022-12-17 13:12:54 +00:00
|
|
|
error: `0 as *const _` detected
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/zero_ptr_no_std.rs:7:13
|
2022-12-17 13:12:54 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 0 as *const usize;
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `core::ptr::null::<usize>()`
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/zero_ptr_no_std.rs:3:9
|
2022-12-17 13:12:54 +00:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::zero_ptr)]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `0 as *mut _` detected
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/zero_ptr_no_std.rs:8:13
|
2022-12-17 13:12:54 +00:00
|
|
|
|
|
|
|
|
LL | let _ = 0 as *mut f64;
|
|
|
|
| ^^^^^^^^^^^^^ help: try: `core::ptr::null_mut::<f64>()`
|
|
|
|
|
|
|
|
error: `0 as *const _` detected
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/zero_ptr_no_std.rs:9:24
|
2022-12-17 13:12:54 +00:00
|
|
|
|
|
|
|
|
LL | let _: *const u8 = 0 as *const _;
|
|
|
|
| ^^^^^^^^^^^^^ help: try: `core::ptr::null()`
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|