]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/transmute-const.32bit.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / transmute-const.32bit.stderr
CommitLineData
a1dfa0c6 1error[E0080]: it is undefined behavior to use this value
cdc7bbd5 2 --> $DIR/transmute-const.rs:4:1
8faf50e0 3 |
b7449926 4LL | static FOO: bool = unsafe { mem::transmute(3u8) };
064997fb 5 | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
8faf50e0 6 |
e1599b0c 7 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
cdc7bbd5
XL
8 = note: the raw bytes of the constant (size: 1, align: 1) {
9 03 │ .
10 }
8faf50e0
XL
11
12error: aborting due to previous error
13
14For more information about this error, try `rustc --explain E0080`.