rust/src/test/ui/consts/const-eval/transmute-const-promotion.rs

9 lines
168 B
Rust
Raw Normal View History

#![feature(const_transmute)]
use std::mem;
fn main() {
let x: &'static u32 = unsafe { &mem::transmute(3.0f32) };
//~^ ERROR value does not live long enough
}