]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/consts/const-eval/union-ub.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / union-ub.rs
index c1bfe69a706e446736bcefa25e9b233c72e332dd..bb29edcf8b0118b18643259f35570f3759e10173 100644 (file)
@@ -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