diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-05-28 10:29:08 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-06-02 15:37:15 +0000 |
| commit | b331b8b96d86a6433df957a3cc49ed51f3656135 (patch) | |
| tree | 72e20ae9fa73a475719589593a790156181e4e24 /tests/ui/consts/const-eval/ub-int-array.rs | |
| parent | e6152cdf5b31bd844a4cc1049433859d54863602 (diff) | |
| download | rust-b331b8b96d86a6433df957a3cc49ed51f3656135.tar.gz rust-b331b8b96d86a6433df957a3cc49ed51f3656135.zip | |
Use the informative error as the main const eval error message
Diffstat (limited to 'tests/ui/consts/const-eval/ub-int-array.rs')
| -rw-r--r-- | tests/ui/consts/const-eval/ub-int-array.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/ui/consts/const-eval/ub-int-array.rs b/tests/ui/consts/const-eval/ub-int-array.rs index 169ac7f1519..eebbccaa7c1 100644 --- a/tests/ui/consts/const-eval/ub-int-array.rs +++ b/tests/ui/consts/const-eval/ub-int-array.rs @@ -18,8 +18,7 @@ impl<T: Copy> MaybeUninit<T> { } const UNINIT_INT_0: [u32; 3] = unsafe { - //~^ ERROR it is undefined behavior to use this value - //~| NOTE invalid value at [0] + //~^ ERROR invalid value at [0] mem::transmute([ MaybeUninit { uninit: () }, // Constants chosen to achieve endianness-independent hex dump. @@ -28,8 +27,7 @@ const UNINIT_INT_0: [u32; 3] = unsafe { ]) }; const UNINIT_INT_1: [u32; 3] = unsafe { - //~^ ERROR it is undefined behavior to use this value - //~| NOTE invalid value at [1] + //~^ ERROR invalid value at [1] mem::transmute([ MaybeUninit::new(0u8), MaybeUninit::new(0u8), @@ -46,8 +44,7 @@ const UNINIT_INT_1: [u32; 3] = unsafe { ]) }; const UNINIT_INT_2: [u32; 3] = unsafe { - //~^ ERROR it is undefined behavior to use this value - //~| NOTE invalid value at [2] + //~^ ERROR invalid value at [2] mem::transmute([ MaybeUninit::new(0u8), MaybeUninit::new(0u8), |
