mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
14 lines
380 B
Rust
14 lines
380 B
Rust
#![allow(dead_code)]
|
|
#![allow(clippy::zero_ptr)]
|
|
#![allow(clippy::transmute_ptr_to_ref)]
|
|
#![allow(clippy::transmuting_null, clippy::missing_transmute_annotations)]
|
|
|
|
pub const ZPTR: *const usize = 0 as *const _;
|
|
|
|
fn main() {
|
|
unsafe {
|
|
#[clippy::author]
|
|
let _: &i32 = std::mem::transmute(ZPTR);
|
|
let _: &i32 = std::mem::transmute(0 as *const i32);
|
|
}
|
|
}
|