1 #![feature(const_raw_ptr_deref)]
4 let x: &'static bool = &(42 as *const i32 == 43 as *const i32);
5 //~^ ERROR temporary value dropped while borrowed
6 let y: &'static usize = &(&1 as *const i32 as usize + 1);
7 //~^ ERROR temporary value dropped while borrowed
8 let z: &'static i32 = &(unsafe { *(42 as *const i32) });
9 //~^ ERROR temporary value dropped while borrowed
10 let a: &'static bool = &(main as fn() == main as fn());
11 //~^ ERROR temporary value dropped while borrowed