From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/consts/extra-const-ub/detect-extra-ub.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/test/ui/consts/extra-const-ub/detect-extra-ub.rs') diff --git a/src/test/ui/consts/extra-const-ub/detect-extra-ub.rs b/src/test/ui/consts/extra-const-ub/detect-extra-ub.rs index 86fbadb94..159cdf257 100644 --- a/src/test/ui/consts/extra-const-ub/detect-extra-ub.rs +++ b/src/test/ui/consts/extra-const-ub/detect-extra-ub.rs @@ -13,15 +13,13 @@ const INVALID_BOOL: () = unsafe { const INVALID_PTR_IN_INT: () = unsafe { let _x: usize = transmute(&3u8); - //[with_flag]~^ ERROR: any use of this value will cause an error - //[with_flag]~| previously accepted + //[with_flag]~^ ERROR: evaluation of constant value failed }; const INVALID_SLICE_TO_USIZE_TRANSMUTE: () = unsafe { let x: &[u8] = &[0; 32]; let _x: (usize, usize) = transmute(x); - //[with_flag]~^ ERROR: any use of this value will cause an error - //[with_flag]~| previously accepted + //[with_flag]~^ ERROR: evaluation of constant value failed }; const UNALIGNED_PTR: () = unsafe { @@ -31,8 +29,7 @@ const UNALIGNED_PTR: () = unsafe { }; const UNALIGNED_READ: () = { - INNER; //[with_flag]~ERROR any use of this value will cause an error - //[with_flag]~| previously accepted + INNER; //[with_flag]~ERROR evaluation of constant value failed // There is an error here but its span is in the standard library so we cannot match it... // so we have this in a *nested* const, such that the *outer* const fails to use it. const INNER: () = unsafe { -- cgit v1.2.3