]> git.lizzy.rs Git - rust.git/blob - tests/ui/zero_ptr.rs
Move MSRV tests into the lint specific test files
[rust.git] / tests / ui / zero_ptr.rs
1 // run-rustfix
2 pub fn foo(_const: *const f32, _mut: *mut i64) {}
3
4 fn main() {
5     let _ = 0 as *const usize;
6     let _ = 0 as *mut f64;
7     let _: *const u8 = 0 as *const _;
8
9     foo(0 as _, 0 as _);
10     foo(0 as *const _, 0 as *mut _);
11
12     let z = 0;
13     let _ = z as *const usize; // this is currently not caught
14 }