about summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/transmute-const-promotion.rs
blob: 840334f43c09cef011013a135d5913809f38e7da (plain)
1
2
3
4
5
6
7
#![allow(unnecessary_transmutes)]
use std::mem;

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