rust/tests/ui/consts/const-eval/transmute-const.rs
2024-02-16 20:02:50 +00:00

8 lines
158 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() {}