1
Fork 0
rust/src/test/ui/consts/const-eval/union-const-eval-field.stderr

15 lines
824 B
Text
Raw Normal View History

error[E0080]: it is undefined behavior to use this value
--> $DIR/union-const-eval-field.rs:28:5
2018-06-04 18:32:06 +02: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
|
= 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.
= note: the raw bytes of the constant (size: 8, align: 8) {
__ __ __ __ __ __ __ __ │ ░░░░░░░░
}
2018-06-04 18:32:06 +02:00
error: aborting due to previous error
2018-06-04 18:32:06 +02:00
For more information about this error, try `rustc --explain E0080`.