]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-83182.stderr
Rollup merge of #106951 - tmiasko:rm-simplify-initial, r=oli-obk
[rust.git] / tests / ui / consts / issue-83182.stderr
1 error[E0080]: it is undefined behavior to use this value
2   --> $DIR/issue-83182.rs:7:1
3    |
4 LL | const MYSTR_NO_INIT: &MyStr = unsafe { mem::transmute::<&[_], _>(&[&()]) };
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
6    |
7    = help: this code performed an operation that depends on the underlying bytes representing a pointer
8    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
9    = note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
10                HEX_DUMP
11            }
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0080`.