summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/union-ub.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/consts/const-eval/union-ub.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/ui/consts/const-eval/union-ub.rs b/src/test/ui/consts/const-eval/union-ub.rs
index c1bfe69a7..bb29edcf8 100644
--- a/src/test/ui/consts/const-eval/union-ub.rs
+++ b/src/test/ui/consts/const-eval/union-ub.rs
@@ -33,7 +33,8 @@ union Bar {
const BAD_BOOL: bool = unsafe { DummyUnion { u8: 42 }.bool};
//~^ ERROR it is undefined behavior to use this value
const UNINIT_BOOL: bool = unsafe { DummyUnion { unit: () }.bool};
-//~^ ERROR it is undefined behavior to use this value
+//~^ ERROR evaluation of constant value failed
+//~| uninitialized
// The value is not valid for any union variant, but that's fine
// unions are just a convenient way to transmute bits around