blob: a6f7540dd59d6ddf3400a121963c3d56b00382ad [file] [log] [blame]
use std::mem::{transmute, ManuallyDrop};
const S: &'static mut str = &mut " hello ";
//~^ ERROR: mutable borrows of temporaries
const fn trigger() -> [(); unsafe {
let s = transmute::<(*const u8, usize), &ManuallyDrop<str>>((S.as_ptr(), 3));
0
}] {
[(); 0]
}
fn main() {}