rust/tests/ui/consts/const-eval/transmute-const.rs
2023-01-11 09:32:08 +00:00

8 lines
157 B
Rust

// stderr-per-bitwidth
use std::mem;
static FOO: bool = unsafe { mem::transmute(3u8) };
//~^ ERROR it is undefined behavior to use this value
fn main() {}