mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
10 lines
225 B
Rust
10 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
|
|
}
|