]>
Commit | Line | Data |
---|---|---|
a1dfa0c6 | 1 | error[E0080]: it is undefined behavior to use this value |
e1599b0c | 2 | --> $DIR/double_check2.rs:16:1 |
8faf50e0 | 3 | | |
532ac7d7 | 4 | LL | / static FOO: (&Foo, &Bar) = unsafe {( |
a1dfa0c6 XL |
5 | LL | | Union { u8: &BAR }.foo, |
6 | LL | | Union { u8: &BAR }.bar, | |
8faf50e0 | 7 | LL | | )}; |
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 |
12 | error[E0080]: it is undefined behavior to use this value |
13 | --> $DIR/double_check2.rs:20:1 | |
14 | | | |
15 | LL | 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 | ||
20 | error: aborting due to 2 previous errors | |
8faf50e0 XL |
21 | |
22 | For more information about this error, try `rustc --explain E0080`. |