blob: f714fd6e8f9df85503bcead3595f83dc25e1606c (
plain)
1
2
3
4
5
6
7
8
|
// stderr-per-bitwidth
use std::mem;
struct MyStr(str);
const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
//~^ ERROR: it is undefined behavior to use this value
//~| type validation failed at .<deref>.0: encountered a pointer in `str`
fn main() {}
|