2018-11-06 14:17:40 +01:00
error[E0080]: it is undefined behavior to use this value
2021-04-26 14:53:41 +02:00
--> $DIR/union-const-eval-field.rs:28:5
2018-06-04 18:32:06 +02:00
|
2018-11-06 14:17:40 +01:00
LL | const FIELD3: Field3 = unsafe { UNION.field3 };
2018-11-07 13:51:29 +01:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
2018-06-04 18:32:06 +02:00
|
2019-09-01 18:09:59 +01:00
= 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.
2021-02-01 12:02:31 +00:00
= note: the raw bytes of the constant (size: 8, align: 8) {
__ __ __ __ __ __ __ __ │ ░░░░░░░░
}
2018-06-04 18:32:06 +02:00
2018-09-19 17:22:03 +02:00
error: aborting due to previous error
2018-06-04 18:32:06 +02:00
2018-11-06 14:17:40 +01:00
For more information about this error, try `rustc --explain E0080`.