Skip to content

stage2: disable some parts of @Type, add @Int, @Float, @Array #13982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions doc/langref.html.in
Original file line number Diff line number Diff line change
Expand Up @@ -7618,6 +7618,14 @@ comptime {
{#see_also|Alignment#}
{#header_close#}

{#header_open|@Array#}
<pre>{#syntax#}@Array(comptime len: usize, comptime Child: type) type{#endsyntax#}</pre>
<pre>{#syntax#}@Array(comptime len: usize, comptime Child: type, comptime sentinel: Child) type{#endsyntax#}</pre>
<p>
TODO
</p>
{#header_close#}

{#header_open|@as#}
<pre>{#syntax#}@as(comptime T: type, expression) T{#endsyntax#}</pre>
<p>
Expand Down Expand Up @@ -8187,7 +8195,7 @@ test "main" {
{#header_close#}

{#header_open|@errorToInt#}
<pre>{#syntax#}@errorToInt(err: anytype) std.meta.Int(.unsigned, @sizeOf(anyerror) * 8){#endsyntax#}</pre>
<pre>{#syntax#}@errorToInt(err: anytype) @Int(.unsigned, @sizeOf(anyerror) * 8){#endsyntax#}</pre>
<p>
Supports the following types:
</p>
Expand Down Expand Up @@ -8321,6 +8329,13 @@ test "decl access by string" {
</p>
{#header_close#}

{#header_open|@Float#}
<pre>{#syntax#}@Float(comptime bit_count: u16) type{#endsyntax#}</pre>
<p>
TODO
</p>
{#header_close#}

{#header_open|@floatCast#}
<pre>{#syntax#}@floatCast(comptime DestType: type, value: anytype) DestType{#endsyntax#}</pre>
<p>
Expand Down Expand Up @@ -8435,6 +8450,13 @@ test "@hasDecl" {
{#see_also|Compile Variables|@embedFile#}
{#header_close#}

{#header_open|@Int#}
<pre>{#syntax#}@Int(comptime signedness: std.builtin.Signedness, comptime bit_count: u16) type{#endsyntax#}</pre>
<p>
TODO
</p>
{#header_close#}

{#header_open|@intCast#}
<pre>{#syntax#}@intCast(comptime DestType: type, int: anytype) DestType{#endsyntax#}</pre>
<p>
Expand Down Expand Up @@ -8471,7 +8493,7 @@ test "integer cast panic" {
{#header_close#}

{#header_open|@intToError#}
<pre>{#syntax#}@intToError(value: std.meta.Int(.unsigned, @sizeOf(anyerror) * 8)) anyerror{#endsyntax#}</pre>
<pre>{#syntax#}@intToError(value: @Int(.unsigned, @sizeOf(anyerror) * 8)) anyerror{#endsyntax#}</pre>
<p>
Converts from the integer representation of an error into {#link|The Global Error Set#} type.
</p>
Expand Down
4 changes: 2 additions & 2 deletions lib/compiler_rt/addf3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const normalize = common.normalize;
/// https://github.com/llvm/llvm-project/blob/02d85149a05cb1f6dc49f0ba7a2ceca53718ae17/compiler-rt/lib/builtins/fp_add_impl.inc
pub inline fn addf3(comptime T: type, a: T, b: T) T {
const bits = @typeInfo(T).Float.bits;
const Z = std.meta.Int(.unsigned, bits);
const S = std.meta.Int(.unsigned, bits - @clz(@as(Z, bits) - 1));
const Z = @Int(.unsigned, bits);
const S = @Int(.unsigned, bits - @clz(@as(Z, bits) - 1));

const typeWidth = bits;
const significandBits = math.floatMantissaBits(T);
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/atomics.zig
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ fn __atomic_store_8(dst: *u64, value: u64, model: i32) callconv(.C) void {
}

fn wideUpdate(comptime T: type, ptr: *T, val: T, update: anytype) T {
const WideAtomic = std.meta.Int(.unsigned, smallest_atomic_fetch_exch_size * 8);
const WideAtomic = @Int(.unsigned, smallest_atomic_fetch_exch_size * 8);

const addr = @ptrToInt(ptr);
const wide_addr = addr & ~(@as(T, smallest_atomic_fetch_exch_size) - 1);
Expand Down
9 changes: 3 additions & 6 deletions lib/compiler_rt/common.zig
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ pub fn wideMultiply(comptime Z: type, a: Z, b: Z, hi: *Z, lo: *Z) void {
}
}

pub fn normalize(comptime T: type, significand: *std.meta.Int(.unsigned, @typeInfo(T).Float.bits)) i32 {
const Z = std.meta.Int(.unsigned, @typeInfo(T).Float.bits);
pub fn normalize(comptime T: type, significand: *@Int(.unsigned, @typeInfo(T).Float.bits)) i32 {
const Z = @Int(.unsigned, @typeInfo(T).Float.bits);
const integerBit = @as(Z, 1) << std.math.floatFractionalBits(T);

const shift = @clz(significand.*) - @clz(integerBit);
Expand All @@ -209,10 +209,7 @@ pub fn normalize(comptime T: type, significand: *std.meta.Int(.unsigned, @typeIn
pub inline fn fneg(a: anytype) @TypeOf(a) {
const F = @TypeOf(a);
const bits = @typeInfo(F).Float.bits;
const U = @Type(.{ .Int = .{
.signedness = .unsigned,
.bits = bits,
} });
const U = @Int(.unsigned, bits);
const sign_bit_mask = @as(U, 1) << (bits - 1);
const negated = @bitCast(U, a) ^ sign_bit_mask;
return @bitCast(F, negated);
Expand Down
6 changes: 3 additions & 3 deletions lib/compiler_rt/comparef.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pub const GE = enum(i32) {

pub inline fn cmpf2(comptime T: type, comptime RT: type, a: T, b: T) RT {
const bits = @typeInfo(T).Float.bits;
const srep_t = std.meta.Int(.signed, bits);
const rep_t = std.meta.Int(.unsigned, bits);
const srep_t = @Int(.signed, bits);
const rep_t = @Int(.unsigned, bits);

const significandBits = std.math.floatMantissaBits(T);
const exponentBits = std.math.floatExponentBits(T);
Expand Down Expand Up @@ -98,7 +98,7 @@ pub inline fn cmp_f80(comptime RT: type, a: f80, b: f80) RT {
}

pub inline fn unordcmp(comptime T: type, a: T, b: T) i32 {
const rep_t = std.meta.Int(.unsigned, @typeInfo(T).Float.bits);
const rep_t = @Int(.unsigned, @typeInfo(T).Float.bits);

const significandBits = std.math.floatMantissaBits(T);
const exponentBits = std.math.floatExponentBits(T);
Expand Down
4 changes: 2 additions & 2 deletions lib/compiler_rt/divdf3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn __aeabi_ddiv(a: f64, b: f64) callconv(.AAPCS) f64 {
}

inline fn div(a: f64, b: f64) f64 {
const Z = std.meta.Int(.unsigned, 64);
const SignedZ = std.meta.Int(.signed, 64);
const Z = @Int(.unsigned, 64);
const SignedZ = @Int(.signed, 64);

const significandBits = std.math.floatMantissaBits(f64);
const exponentBits = std.math.floatExponentBits(f64);
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/divsf3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn __aeabi_fdiv(a: f32, b: f32) callconv(.AAPCS) f32 {
}

inline fn div(a: f32, b: f32) f32 {
const Z = std.meta.Int(.unsigned, 32);
const Z = @Int(.unsigned, 32);

const significandBits = std.math.floatMantissaBits(f32);
const exponentBits = std.math.floatExponentBits(f32);
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/divtf3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn _Qp_div(c: *f128, a: *const f128, b: *const f128) callconv(.C) void {
}

inline fn div(a: f128, b: f128) f128 {
const Z = std.meta.Int(.unsigned, 128);
const Z = @Int(.unsigned, 128);

const significandBits = std.math.floatMantissaBits(f128);
const exponentBits = std.math.floatExponentBits(f128);
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/divti3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn __divti3(a: i128, b: i128) callconv(.C) i128 {
return div(a, b);
}

const v128 = @import("std").meta.Vector(2, u64);
const v128 = @Vector(2, u64);

fn __divti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 {
return @bitCast(v128, div(@bitCast(i128, a), @bitCast(i128, b)));
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/divxf3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ comptime {

pub fn __divxf3(a: f80, b: f80) callconv(.C) f80 {
const T = f80;
const Z = std.meta.Int(.unsigned, @bitSizeOf(T));
const Z = @Int(.unsigned, @bitSizeOf(T));

const significandBits = std.math.floatMantissaBits(T);
const fractionalBits = std.math.floatFractionalBits(T);
Expand Down
10 changes: 5 additions & 5 deletions lib/compiler_rt/extendf.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ const std = @import("std");
pub inline fn extendf(
comptime dst_t: type,
comptime src_t: type,
a: std.meta.Int(.unsigned, @typeInfo(src_t).Float.bits),
a: @Int(.unsigned, @typeInfo(src_t).Float.bits),
) dst_t {
const src_rep_t = std.meta.Int(.unsigned, @typeInfo(src_t).Float.bits);
const dst_rep_t = std.meta.Int(.unsigned, @typeInfo(dst_t).Float.bits);
const src_rep_t = @Int(.unsigned, @typeInfo(src_t).Float.bits);
const dst_rep_t = @Int(.unsigned, @typeInfo(dst_t).Float.bits);
const srcSigBits = std.math.floatMantissaBits(src_t);
const dstSigBits = std.math.floatMantissaBits(dst_t);
const DstShift = std.math.Log2Int(dst_rep_t);
Expand Down Expand Up @@ -72,8 +72,8 @@ pub inline fn extendf(
return @bitCast(dst_t, result);
}

pub inline fn extend_f80(comptime src_t: type, a: std.meta.Int(.unsigned, @typeInfo(src_t).Float.bits)) f80 {
const src_rep_t = std.meta.Int(.unsigned, @typeInfo(src_t).Float.bits);
pub inline fn extend_f80(comptime src_t: type, a: @Int(.unsigned, @typeInfo(src_t).Float.bits)) f80 {
const src_rep_t = @Int(.unsigned, @typeInfo(src_t).Float.bits);
const src_sig_bits = std.math.floatMantissaBits(src_t);
const dst_int_bit = 0x8000000000000000;
const dst_sig_bits = std.math.floatMantissaBits(f80) - 1; // -1 for the integer bit
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/fabs.zig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn fabsl(x: c_longdouble) callconv(.C) c_longdouble {

inline fn generic_fabs(x: anytype) @TypeOf(x) {
const T = @TypeOf(x);
const TBits = std.meta.Int(.unsigned, @typeInfo(T).Float.bits);
const TBits = @Int(.unsigned, @typeInfo(T).Float.bits);
const float_bits = @bitCast(TBits, x);
const remove_sign = ~@as(TBits, 0) >> 1;
return @bitCast(T, float_bits & remove_sign);
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/fixunshfti.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn __fixunshfti(a: f16) callconv(.C) u128 {
return floatToInt(u128, a);
}

const v2u64 = @import("std").meta.Vector(2, u64);
const v2u64 = @Vector(2, u64);

fn __fixunshfti_windows_x86_64(a: f16) callconv(.C) v2u64 {
return @bitCast(v2u64, floatToInt(u128, a));
Expand Down
3 changes: 1 addition & 2 deletions lib/compiler_rt/float_to_int.zig
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const Int = @import("std").meta.Int;
const math = @import("std").math;
const Log2Int = math.Log2Int;

pub inline fn floatToInt(comptime I: type, a: anytype) I {
const F = @TypeOf(a);
const float_bits = @typeInfo(F).Float.bits;
const int_bits = @typeInfo(I).Int.bits;
const rep_t = Int(.unsigned, float_bits);
const rep_t = @Int(.unsigned, float_bits);
const sig_bits = math.floatMantissaBits(F);
const exp_bits = math.floatExponentBits(F);
const fractional_bits = math.floatFractionalBits(F);
Expand Down
4 changes: 2 additions & 2 deletions lib/compiler_rt/fmod.zig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn fmod(x: f64, y: f64) callconv(.C) f64 {
/// Logic and flow heavily inspired by MUSL fmodl for 113 mantissa digits
pub fn __fmodx(a: f80, b: f80) callconv(.C) f80 {
const T = f80;
const Z = std.meta.Int(.unsigned, @bitSizeOf(T));
const Z = @Int(.unsigned, @bitSizeOf(T));

const significandBits = math.floatMantissaBits(T);
const fractionalBits = math.floatFractionalBits(T);
Expand Down Expand Up @@ -263,7 +263,7 @@ pub fn fmodl(a: c_longdouble, b: c_longdouble) callconv(.C) c_longdouble {

inline fn generic_fmod(comptime T: type, x: T, y: T) T {
const bits = @typeInfo(T).Float.bits;
const uint = std.meta.Int(.unsigned, bits);
const uint = @Int(.unsigned, bits);
const log2uint = math.Log2Int(uint);
comptime assert(T == f32 or T == f64);
const digits = if (T == f32) 23 else 52;
Expand Down
7 changes: 3 additions & 4 deletions lib/compiler_rt/int_to_float.zig
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
const Int = @import("std").meta.Int;
const math = @import("std").math;

pub fn intToFloat(comptime T: type, x: anytype) T {
if (x == 0) return 0;

// Various constants whose values follow from the type parameters.
// Any reasonable optimizer will fold and propagate all of these.
const Z = Int(.unsigned, @bitSizeOf(@TypeOf(x)));
const uT = Int(.unsigned, @bitSizeOf(T));
const Z = @Int(.unsigned, @bitSizeOf(@TypeOf(x)));
const uT = @Int(.unsigned, @bitSizeOf(T));
const inf = math.inf(T);
const float_bits = @bitSizeOf(T);
const int_bits = @bitSizeOf(@TypeOf(x));
const exp_bits = math.floatExponentBits(T);
const fractional_bits = math.floatFractionalBits(T);
const exp_bias = math.maxInt(Int(.unsigned, exp_bits - 1));
const exp_bias = math.maxInt(@Int(.unsigned, exp_bits - 1));
const implicit_bit = if (T != f80) @as(uT, 1) << fractional_bits else 0;
const max_exp = exp_bias;

Expand Down
4 changes: 2 additions & 2 deletions lib/compiler_rt/mulf3.zig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub inline fn mulf3(comptime T: type, a: T, b: T) T {
const fractionalBits = math.floatFractionalBits(T);
const exponentBits = math.floatExponentBits(T);

const Z = std.meta.Int(.unsigned, typeWidth);
const Z = @Int(.unsigned, typeWidth);

// ZSignificand is large enough to contain the significand, including an explicit integer bit
const ZSignificand = PowerOfTwoSignificandZ(T);
Expand Down Expand Up @@ -196,7 +196,7 @@ fn normalize(comptime T: type, significand: *PowerOfTwoSignificandZ(T)) i32 {
/// the significand of T, including an explicit integer bit
fn PowerOfTwoSignificandZ(comptime T: type) type {
const bits = math.ceilPowerOfTwoAssert(u16, math.floatFractionalBits(T) + 1);
return std.meta.Int(.unsigned, bits);
return @Int(.unsigned, bits);
}

test {
Expand Down
4 changes: 2 additions & 2 deletions lib/compiler_rt/shift.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ comptime {
fn Dwords(comptime T: type, comptime signed_half: bool) type {
return extern union {
const bits = @divExact(@typeInfo(T).Int.bits, 2);
const HalfTU = std.meta.Int(.unsigned, bits);
const HalfTS = std.meta.Int(.signed, bits);
const HalfTU = @Int(.unsigned, bits);
const HalfTS = @Int(.signed, bits);
const HalfT = if (signed_half) HalfTS else HalfTU;

all: T,
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler_rt/sincos.zig
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ pub const rem_pio2_generic = @compileError("TODO");
inline fn sincos_generic(comptime F: type, x: F, r_sin: *F, r_cos: *F) void {
const sc1pio4: F = 1.0 * math.pi / 4.0;
const bits = @typeInfo(F).Float.bits;
const I = std.meta.Int(.unsigned, bits);
const I = @Int(.unsigned, bits);
const ix = @bitCast(I, x) & (math.maxInt(I) >> 1);
const se = @truncate(u16, ix >> (bits - 16));

Expand Down
6 changes: 3 additions & 3 deletions lib/compiler_rt/truncf.zig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const std = @import("std");

pub inline fn truncf(comptime dst_t: type, comptime src_t: type, a: src_t) dst_t {
const src_rep_t = std.meta.Int(.unsigned, @typeInfo(src_t).Float.bits);
const dst_rep_t = std.meta.Int(.unsigned, @typeInfo(dst_t).Float.bits);
const src_rep_t = @Int(.unsigned, @typeInfo(src_t).Float.bits);
const dst_rep_t = @Int(.unsigned, @typeInfo(dst_t).Float.bits);
const srcSigBits = std.math.floatMantissaBits(src_t);
const dstSigBits = std.math.floatMantissaBits(dst_t);
const SrcShift = std.math.Log2Int(src_rep_t);
Expand Down Expand Up @@ -101,7 +101,7 @@ pub inline fn truncf(comptime dst_t: type, comptime src_t: type, a: src_t) dst_t
}

pub inline fn trunc_f80(comptime dst_t: type, a: f80) dst_t {
const dst_rep_t = std.meta.Int(.unsigned, @typeInfo(dst_t).Float.bits);
const dst_rep_t = @Int(.unsigned, @typeInfo(dst_t).Float.bits);
const src_sig_bits = std.math.floatMantissaBits(f80) - 1; // -1 for the integer bit
const dst_sig_bits = std.math.floatMantissaBits(dst_t);

Expand Down
4 changes: 2 additions & 2 deletions lib/compiler_rt/udivmod.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ pub fn udivmod(comptime DoubleInt: type, a: DoubleInt, b: DoubleInt, maybe_rem:

const double_int_bits = @typeInfo(DoubleInt).Int.bits;
const single_int_bits = @divExact(double_int_bits, 2);
const SingleInt = std.meta.Int(.unsigned, single_int_bits);
const SignedDoubleInt = std.meta.Int(.signed, double_int_bits);
const SingleInt = @Int(.unsigned, single_int_bits);
const SignedDoubleInt = @Int(.signed, double_int_bits);
const Log2SingleInt = std.math.Log2Int(SingleInt);

const n = @bitCast([2]SingleInt, a);
Expand Down
2 changes: 1 addition & 1 deletion lib/std/Thread/RwLock.zig
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub const DefaultRwLock = struct {
const READER: usize = 1 << (1 + @bitSizeOf(Count));
const WRITER_MASK: usize = std.math.maxInt(Count) << @ctz(WRITER);
const READER_MASK: usize = std.math.maxInt(Count) << @ctz(READER);
const Count = std.meta.Int(.unsigned, @divFloor(@bitSizeOf(usize) - 1, 2));
const Count = @Int(.unsigned, @divFloor(@bitSizeOf(usize) - 1, 2));

pub fn tryLock(rwl: *DefaultRwLock) bool {
if (rwl.mutex.tryLock()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/std/atomic/Atomic.zig
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ fn atomicIntTypes() []const type {
comptime var bytes = 1;
comptime var types: []const type = &[_]type{};
inline while (bytes <= @sizeOf(usize)) : (bytes *= 2) {
types = types ++ &[_]type{std.meta.Int(.unsigned, bytes * 8)};
types = types ++ &[_]type{@Int(.unsigned, bytes * 8)};
}
return types;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/std/bit_set.zig
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub fn IntegerBitSet(comptime size: u16) type {
pub const bit_length: usize = size;

/// The integer type used to represent a mask in this bit set
pub const MaskInt = std.meta.Int(.unsigned, size);
pub const MaskInt = @Int(.unsigned, size);

/// The integer type used to shift a mask in this bit set
pub const ShiftInt = std.math.Log2Int(MaskInt);
Expand Down Expand Up @@ -333,7 +333,7 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type {
if (!std.math.isPowerOfTwo(@bitSizeOf(MaskIntType))) {
var desired_bits = std.math.ceilPowerOfTwoAssert(usize, @bitSizeOf(MaskIntType));
if (desired_bits < byte_size) desired_bits = byte_size;
const FixedMaskType = std.meta.Int(.unsigned, desired_bits);
const FixedMaskType = @Int(.unsigned, desired_bits);
@compileError("ArrayBitSet was passed integer type " ++ @typeName(MaskIntType) ++
", which is not a power of two. Please round this up to a power of two integer size (i.e. " ++ @typeName(FixedMaskType) ++ ").");
}
Expand All @@ -344,7 +344,7 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type {
if (@bitSizeOf(MaskIntType) != @sizeOf(MaskIntType) * byte_size) {
var desired_bits = @sizeOf(MaskIntType) * byte_size;
desired_bits = std.math.ceilPowerOfTwoAssert(usize, desired_bits);
const FixedMaskType = std.meta.Int(.unsigned, desired_bits);
const FixedMaskType = @Int(.unsigned, desired_bits);
@compileError("ArrayBitSet was passed integer type " ++ @typeName(MaskIntType) ++
", which contains padding bits. Please round this up to an unpadded integer size (i.e. " ++ @typeName(FixedMaskType) ++ ").");
}
Expand Down
2 changes: 1 addition & 1 deletion lib/std/child_process.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ fn forkChildErrReport(fd: i32, err: ChildProcess.SpawnError) noreturn {
os.exit(1);
}

const ErrInt = std.meta.Int(.unsigned, @sizeOf(anyerror) * 8);
const ErrInt = @Int(.unsigned, @sizeOf(anyerror) * 8);

fn writeIntFd(fd: i32, value: ErrInt) !void {
const file = File{
Expand Down
Loading