zig/test/cases/safety
mlugg f26dda2117 all: migrate code to new cast builtin syntax
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:

* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
2023-06-24 16:56:39 -07:00
..
@alignCast misaligned.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@asyncCall with too small a frame.zig
@enumFromInt - no matching tag value.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@errSetCast error not present in destination.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@intCast to u0.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@intFromFloat cannot fit - negative out of range.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@intFromFloat cannot fit - negative to unsigned.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@intFromFloat cannot fit - positive out of range.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@ptrFromInt address zero to non-optional byte-aligned pointer.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@ptrFromInt address zero to non-optional pointer.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@ptrFromInt with misaligned address.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@tagName on corrupted enum value.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
@tagName on corrupted union value.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
array slice sentinel mismatch non-scalar.zig
array slice sentinel mismatch vector.zig
array slice sentinel mismatch.zig
awaiting twice.zig
bad union field access.zig
calling panic.zig
cast []u8 to bigger slice of wrong size.zig
cast integer to global error and no code matches.zig
empty slice with sentinel out of bounds.zig
error return trace across suspend points.zig
exact division failure - vectors.zig
exact division failure.zig
for_len_mismatch_three.zig
for_len_mismatch.zig
integer addition overflow.zig
integer division by zero - vectors.zig
integer division by zero.zig
integer multiplication overflow.zig
integer negation overflow.zig
integer subtraction overflow.zig
invalid resume of async function.zig
memcpy_alias.zig
memcpy_len_mismatch.zig
memset_array_undefined_bytes.zig
memset_array_undefined_large.zig
memset_slice_undefined_bytes.zig
memset_slice_undefined_large.zig
modrem by zero.zig
modulus by zero.zig
noreturn returned.zig
nosuspend function call, callee suspends.zig
optional unwrap operator on C pointer.zig
optional unwrap operator on null pointer.zig
out of bounds slice access.zig
pointer casting null to non-optional pointer.zig
pointer casting to null function pointer.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
pointer slice sentinel mismatch.zig
remainder division by zero.zig
resuming a function which is awaiting a call.zig
resuming a function which is awaiting a frame.zig
resuming a non-suspended function which has been suspended and resumed.zig
resuming a non-suspended function which never been suspended.zig
shift left by huge amount.zig
shift right by huge amount.zig
signed integer division overflow - vectors.zig
signed integer division overflow.zig
signed integer not fitting in cast to unsigned integer - widening.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
signed integer not fitting in cast to unsigned integer.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
signed shift left overflow.zig
signed shift right overflow.zig
signed-unsigned vector cast.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
slice sentinel mismatch - floats.zig
slice sentinel mismatch - optional pointers.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
slice slice sentinel mismatch.zig
slice start index greater than end index.zig
slice with sentinel out of bounds - runtime len.zig
slice with sentinel out of bounds.zig
slicing null C pointer - runtime len.zig
slicing null C pointer.zig
switch else on corrupt enum value - one prong.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
switch else on corrupt enum value - union.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
switch else on corrupt enum value.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
switch on corrupted enum value.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
switch on corrupted union value.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
truncating vector cast.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
unreachable.zig
unsigned integer not fitting in cast to signed integer - same bit count.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
unsigned shift left overflow.zig
unsigned shift right overflow.zig
unsigned-signed vector cast.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
unwrap error switch.zig
unwrap error.zig
value does not fit in shortening cast - u0.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
value does not fit in shortening cast.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
vector integer addition overflow.zig
vector integer multiplication overflow.zig
vector integer negation overflow.zig
vector integer subtraction overflow.zig
zero casted to error.zig