std, src, doc, test: remove unused variables

This commit is contained in:
Jacob G-W
2021-06-09 21:35:42 -04:00
committed by Andrew Kelley
parent d34a1ccb0e
commit 641ecc260f
112 changed files with 208 additions and 294 deletions

View File

@@ -584,13 +584,14 @@ test "default struct initialization fields" {
const x = S{
.b = 5,
};
if (x.a + x.b != 1239) {
@compileError("it should be comptime known");
}
var five: i32 = 5;
const y = S{
.b = five,
};
if (x.a + x.b != 1239) {
@compileError("it should be comptime known");
}
try expectEqual(y, x);
try expectEqual(1239, x.a + x.b);
}
@@ -654,6 +655,7 @@ test "zero-bit field in packed struct" {
y: void,
};
var x: S = undefined;
_ = x;
}
test "struct field init with catch" {