about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/zero_ptr_no_std.fixed
blob: bbb2464e41d2caf04183941eab5d7fd29f28ca45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![crate_type = "lib"]
#![no_std]
#![deny(clippy::zero_ptr)]

pub fn main(_argc: isize, _argv: *const *const u8) -> isize {
    let _ = core::ptr::null::<usize>();
    //~^ zero_ptr
    let _ = core::ptr::null_mut::<f64>();
    //~^ zero_ptr
    let _: *const u8 = core::ptr::null();
    //~^ zero_ptr
    0
}