summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/extra-const-ub/detect-extra-ub.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/consts/extra-const-ub/detect-extra-ub.rs')
-rw-r--r--src/test/ui/consts/extra-const-ub/detect-extra-ub.rs9
1 files changed, 3 insertions, 6 deletions
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 {