rust/tests/ui/consts/const-eval/transmute-const.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
134 B
Rust
Raw Normal View History

use std::mem;
static FOO: bool = unsafe { mem::transmute(3u8) };
2018-10-01 10:52:47 +00:00
//~^ ERROR it is undefined behavior to use this value
fn main() {}