]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-83182.rs
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
[rust.git] / src / test / ui / consts / issue-83182.rs
1 // stderr-per-bitwidth
2
3 use std::mem;
4 struct MyStr(str);
5 const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
6 //~^ ERROR: it is undefined behavior to use this value
7 fn main() {}