1
Fork 0

update tests involving CTFE validation

This commit is contained in:
Rémy Rakic 2021-06-13 23:16:00 +02:00
parent 87ecf84c36
commit b87724053e
32 changed files with 95 additions and 95 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: encountered uninitialized bytes at [0]
//~| type validation failed 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: encountered uninitialized bytes at [1]
//~| type validation failed 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: encountered uninitialized bytes at [2]
//~| type validation failed at [2]: encountered uninitialized bytes
mem::transmute(
[
0u8,