summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/union-ub.64bit.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/consts/const-eval/union-ub.64bit.stderr')
-rw-r--r--src/test/ui/consts/const-eval/union-ub.64bit.stderr11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/test/ui/consts/const-eval/union-ub.64bit.stderr b/src/test/ui/consts/const-eval/union-ub.64bit.stderr
index baf682596..38ded4d65 100644
--- a/src/test/ui/consts/const-eval/union-ub.64bit.stderr
+++ b/src/test/ui/consts/const-eval/union-ub.64bit.stderr
@@ -9,16 +9,11 @@ LL | const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool};
2a │ *
}
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/union-ub.rs:35:1
+error[E0080]: evaluation of constant value failed
+ --> $DIR/union-ub.rs:35:36
|
LL | const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool};
- | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected a boolean
- |
- = 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: 1, align: 1) {
- __ │ ░
- }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
error: aborting due to 2 previous errors