test: update cases to silence 'var is never mutated' errors

This commit is contained in:
mlugg
2023-11-11 07:27:31 +00:00
parent 2c1acb6180
commit 21fa187abc
289 changed files with 671 additions and 489 deletions

View File

@@ -14,7 +14,7 @@ fn h() void {
// https://github.com/ziglang/zig/issues/12743
const T = struct { oh_no: *u32 };
var x: T = if (false) {};
_ = x;
_ = &x;
}
fn k(b: bool) void {
// block_ptr case
@@ -22,7 +22,7 @@ fn k(b: bool) void {
var x = if (b) blk: {
break :blk if (false) T{ .oh_no = 2 };
} else T{ .oh_no = 1 };
_ = x;
_ = &x;
}
export fn entry() void {
f(true);