]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-83182.rs
Rollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obk
[rust.git] / src / test / ui / consts / issue-83182.rs
1 // Strip out raw byte dumps to make comparison platform-independent:
2 // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
3 // normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
4
5 use std::mem;
6 struct MyStr(str);
7 const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
8 //~^ ERROR: it is undefined behavior to use this value
9 fn main() {}