summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/transmute-const-promotion.rs
blob: 1f0240d4b5ac7e90ba13665c60b017d790344f99 (plain)
1
2
3
4
5
6
use std::mem;

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