From 94a0819fe3a0d679c3042a77bfe6a2afc505daea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:28 +0200 Subject: Adding upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/consts/const-eval/union-ub.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/ui/consts/const-eval/union-ub.rs') diff --git a/src/test/ui/consts/const-eval/union-ub.rs b/src/test/ui/consts/const-eval/union-ub.rs index c1bfe69a7..043870c9c 100644 --- a/src/test/ui/consts/const-eval/union-ub.rs +++ b/src/test/ui/consts/const-eval/union-ub.rs @@ -1,5 +1,4 @@ // stderr-per-bitwidth -#![allow(const_err)] // make sure we cannot allow away the errors tested here #[repr(C)] union DummyUnion { @@ -33,7 +32,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 -- cgit v1.2.3