]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/double_check2.stderr
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / double_check2.stderr
CommitLineData
a1dfa0c6 1error[E0080]: it is undefined behavior to use this value
e1599b0c 2 --> $DIR/double_check2.rs:16:1
8faf50e0 3 |
532ac7d7 4LL | / static FOO: (&Foo, &Bar) = unsafe {(
a1dfa0c6
XL
5LL | | Union { u8: &BAR }.foo,
6LL | | Union { u8: &BAR }.bar,
8faf50e0 7LL | | )};
f035d41b 8 | |___^ type validation failed: encountered 0x05 at .1.<deref>.<enum-tag>, but expected a valid enum tag
8faf50e0 9 |
e1599b0c 10 = 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.
8faf50e0 11
f035d41b
XL
12error[E0080]: it is undefined behavior to use this value
13 --> $DIR/double_check2.rs:20:1
14 |
15LL | static FOO2: (&Foo, &Bar) = unsafe {(std::mem::transmute(&BAR), std::mem::transmute(&BAR))};
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered 0x05 at .1.<deref>.<enum-tag>, but expected a valid enum tag
17 |
18 = 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.
19
20error: aborting due to 2 previous errors
8faf50e0
XL
21
22For more information about this error, try `rustc --explain E0080`.