mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
26 lines
736 B
Text
26 lines
736 B
Text
error: `0 as *const _` detected
|
|
--> $DIR/zero_ptr_no_std.rs:9:13
|
|
|
|
|
LL | let _ = 0 as *const usize;
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `core::ptr::null::<usize>()`
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/zero_ptr_no_std.rs:5:9
|
|
|
|
|
LL | #![deny(clippy::zero_ptr)]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: `0 as *mut _` detected
|
|
--> $DIR/zero_ptr_no_std.rs:10:13
|
|
|
|
|
LL | let _ = 0 as *mut f64;
|
|
| ^^^^^^^^^^^^^ help: try: `core::ptr::null_mut::<f64>()`
|
|
|
|
error: `0 as *const _` detected
|
|
--> $DIR/zero_ptr_no_std.rs:11:24
|
|
|
|
|
LL | let _: *const u8 = 0 as *const _;
|
|
| ^^^^^^^^^^^^^ help: try: `core::ptr::null()`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|