aboutsummaryrefslogtreecommitdiff
path: root/src/value.zig
diff options
context:
space:
mode:
authorMatthew Lugg <mlugg@mlugg.co.uk>2023-11-19 16:19:06 +0000
committerGitHub <noreply@github.com>2023-11-19 16:19:06 +0000
commit6b1a823b2b30d9318c9877dbdbd3d02fa939fba0 (patch)
tree6e5afdad2397ac7224119811583d19107b6e517a /src/value.zig
parent325e0f5f0e8a9ce2540ec3ec5b7cbbecac15257a (diff)
parent9cf6c1ad11bb5f0247ff3458cba5f3bd156d1fb9 (diff)
downloadzig-6b1a823b2b30d9318c9877dbdbd3d02fa939fba0.tar.gz
zig-6b1a823b2b30d9318c9877dbdbd3d02fa939fba0.zip
Merge pull request #18017 from mlugg/var-never-mutated
compiler: add error for unnecessary use of 'var'
Diffstat (limited to 'src/value.zig')
-rw-r--r--src/value.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/value.zig b/src/value.zig
index 6af43063d1..256b537573 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -2136,7 +2136,7 @@ pub const Value = struct {
lhs_bigint.limbs.len + rhs_bigint.limbs.len,
);
var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
- var limbs_buffer = try arena.alloc(
+ const limbs_buffer = try arena.alloc(
std.math.big.Limb,
std.math.big.int.calcMulLimbsBufferLen(lhs_bigint.limbs.len, rhs_bigint.limbs.len, 1),
);
@@ -2249,7 +2249,7 @@ pub const Value = struct {
),
);
var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
- var limbs_buffer = try arena.alloc(
+ const limbs_buffer = try arena.alloc(
std.math.big.Limb,
std.math.big.int.calcMulLimbsBufferLen(lhs_bigint.limbs.len, rhs_bigint.limbs.len, 1),
);
@@ -2788,7 +2788,7 @@ pub const Value = struct {
lhs_bigint.limbs.len + rhs_bigint.limbs.len,
);
var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
- var limbs_buffer = try allocator.alloc(
+ const limbs_buffer = try allocator.alloc(
std.math.big.Limb,
std.math.big.int.calcMulLimbsBufferLen(lhs_bigint.limbs.len, rhs_bigint.limbs.len, 1),
);