summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/ub-int-array.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-eval/ub-int-array.rs')
-rw-r--r--tests/ui/consts/const-eval/ub-int-array.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/ui/consts/const-eval/ub-int-array.rs b/tests/ui/consts/const-eval/ub-int-array.rs
index adcf376b9..cde0749dc 100644
--- a/tests/ui/consts/const-eval/ub-int-array.rs
+++ b/tests/ui/consts/const-eval/ub-int-array.rs
@@ -1,4 +1,3 @@
-// stderr-per-bitwidth
//! Test the "array of int" fast path in validity checking, and in particular whether it
//! points at the right array element.
@@ -19,7 +18,12 @@ impl<T: Copy> MaybeUninit<T> {
const UNINIT_INT_0: [u32; 3] = unsafe {
//~^ ERROR it is undefined behavior to use this value
//~| invalid value at [0]
- mem::transmute([MaybeUninit { uninit: () }, MaybeUninit::new(1), MaybeUninit::new(2)])
+ mem::transmute([
+ MaybeUninit { uninit: () },
+ // Constants chosen to achieve endianness-independent hex dump.
+ MaybeUninit::new(0x11111111),
+ MaybeUninit::new(0x22222222),
+ ])
};
const UNINIT_INT_1: [u32; 3] = unsafe {
//~^ ERROR it is undefined behavior to use this value