rust-clippy/tests/ui/zero_ptr.rs

12 lines
181 B
Rust
Raw Normal View History

2017-09-18 10:47:33 +00:00
#[allow(unused_variables)]
fn main() {
let x = 0 as *const usize;
let y = 0 as *mut f64;
let z = 0;
let z = z as *const usize; // this is currently not caught
}