mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
9 lines
225 B
Rust
9 lines
225 B
Rust
#![deny(trivial_casts, trivial_numeric_casts)]
|
|
|
|
fn main() {
|
|
let lugubrious = 12i32 as i32;
|
|
//~^ ERROR trivial numeric cast
|
|
let haunted: &u32 = &99;
|
|
let _ = haunted as *const u32;
|
|
//~^ ERROR trivial cast
|
|
}
|