rust/src/test/ui/consts/issue-83182.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
201 B
Rust
Raw Normal View History

2021-05-15 11:02:39 -05:00
// stderr-per-bitwidth
2021-05-15 08:04:41 -05:00
use std::mem;
struct MyStr(str);
const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
//~^ ERROR: it is undefined behavior to use this value
fn main() {}