diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-06-21 20:20:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-21 20:20:48 -0400 |
| commit | c6844072ce440f581787bf97909261084a9edc6c (patch) | |
| tree | b0cade24a1ee14777be05644c19d76d158c3ab29 /lib/std/bit_set.zig | |
| parent | 8a6de78e0787015153707361a58659834d4c39c2 (diff) | |
| parent | 7bebb24838a603a436b58e49ee85110af9e8e05f (diff) | |
| download | zig-c6844072ce440f581787bf97909261084a9edc6c.tar.gz zig-c6844072ce440f581787bf97909261084a9edc6c.zip | |
Merge pull request #9047 from g-w1/spider-astgen
stage2 astgen: catch unused vars
Diffstat (limited to 'lib/std/bit_set.zig')
| -rw-r--r-- | lib/std/bit_set.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/std/bit_set.zig b/lib/std/bit_set.zig index 7187b564d2..f7339bfdcf 100644 --- a/lib/std/bit_set.zig +++ b/lib/std/bit_set.zig @@ -84,6 +84,7 @@ pub fn IntegerBitSet(comptime size: u16) type { /// Returns the number of bits in this bit set pub inline fn capacity(self: Self) usize { + _ = self; return bit_length; } @@ -311,6 +312,7 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type { /// Returns the number of bits in this bit set pub inline fn capacity(self: Self) usize { + _ = self; return bit_length; } @@ -373,7 +375,7 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type { /// Flips every bit in the bit set. pub fn toggleAll(self: *Self) void { - for (self.masks) |*mask, i| { + for (self.masks) |*mask| { mask.* = ~mask.*; } @@ -642,7 +644,7 @@ pub const DynamicBitSetUnmanaged = struct { if (bit_length == 0) return; const num_masks = numMasks(self.bit_length); - for (self.masks[0..num_masks]) |*mask, i| { + for (self.masks[0..num_masks]) |*mask| { mask.* = ~mask.*; } |
