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

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

7 lines
145 B
Rust
Raw Normal View History

use std::mem;
fn main() {
let x: &'static u32 = unsafe { &mem::transmute(3.0f32) };
//~^ ERROR temporary value dropped while borrowed
}