1
Fork 0

interpret: adjust error from constructing an invalid value

This commit is contained in:
Ralf Jung 2022-06-25 23:46:51 -04:00
parent 66c83ffca1
commit 238501c137
55 changed files with 192 additions and 190 deletions

View file

@ -13,7 +13,7 @@ union MaybeUninit<T: Copy> {
const UNINIT_INT_0: [u32; 3] = unsafe {
//~^ ERROR it is undefined behavior to use this value
//~| type validation failed at [0]: encountered uninitialized bytes
//~| constructing invalid value at [0]: encountered uninitialized bytes
[
MaybeUninit { uninit: () }.init,
1,
@ -22,7 +22,7 @@ const UNINIT_INT_0: [u32; 3] = unsafe {
};
const UNINIT_INT_1: [u32; 3] = unsafe {
//~^ ERROR it is undefined behavior to use this value
//~| type validation failed at [1]: encountered uninitialized bytes
//~| constructing invalid value at [1]: encountered uninitialized bytes
mem::transmute(
[
0u8,
@ -42,7 +42,7 @@ const UNINIT_INT_1: [u32; 3] = unsafe {
};
const UNINIT_INT_2: [u32; 3] = unsafe {
//~^ ERROR it is undefined behavior to use this value
//~| type validation failed at [2]: encountered uninitialized bytes
//~| constructing invalid value at [2]: encountered uninitialized bytes
mem::transmute(
[
0u8,