diff options
| author | Matthew Lugg <mlugg@mlugg.co.uk> | 2025-11-23 07:50:29 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 07:50:29 +0000 |
| commit | 6d543bcf94b2deefa918cb29de93fc32a10d4abf (patch) | |
| tree | d6d90938858a7479b682a3b97c98cb3ab67cd4df /src/Type.zig | |
| parent | 0a9f666ea62829607d782dc0cac5d10099def180 (diff) | |
| parent | dec1163fbb892f276179ae74b51007c656157d99 (diff) | |
| download | zig-6d543bcf94b2deefa918cb29de93fc32a10d4abf.tar.gz zig-6d543bcf94b2deefa918cb29de93fc32a10d4abf.zip | |
Merge pull request #23733 from alichraghi/bp
replace @Type with individual type-creating builtins
Diffstat (limited to 'src/Type.zig')
| -rw-r--r-- | src/Type.zig | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Type.zig b/src/Type.zig index 74a540298c..3d3b36640c 100644 --- a/src/Type.zig +++ b/src/Type.zig @@ -317,7 +317,7 @@ pub fn print(ty: Type, writer: *std.Io.Writer, pt: Zcu.PerThread, ctx: ?*Compari .undefined, => try writer.print("@TypeOf({s})", .{@tagName(s)}), - .enum_literal => try writer.writeAll("@Type(.enum_literal)"), + .enum_literal => try writer.writeAll("@EnumLiteral()"), .generic_poison => unreachable, }, @@ -3509,7 +3509,9 @@ pub fn typeDeclSrcLine(ty: Type, zcu: *Zcu) ?u32 { .union_decl => zir.extraData(Zir.Inst.UnionDecl, inst.data.extended.operand).data.src_line, .enum_decl => zir.extraData(Zir.Inst.EnumDecl, inst.data.extended.operand).data.src_line, .opaque_decl => zir.extraData(Zir.Inst.OpaqueDecl, inst.data.extended.operand).data.src_line, - .reify => zir.extraData(Zir.Inst.Reify, inst.data.extended.operand).data.src_line, + .reify_enum => zir.extraData(Zir.Inst.ReifyEnum, inst.data.extended.operand).data.src_line, + .reify_struct => zir.extraData(Zir.Inst.ReifyStruct, inst.data.extended.operand).data.src_line, + .reify_union => zir.extraData(Zir.Inst.ReifyUnion, inst.data.extended.operand).data.src_line, else => unreachable, }, else => unreachable, @@ -4280,6 +4282,10 @@ pub const manyptr_const_u8: Type = .{ .ip_index = .manyptr_const_u8_type }; pub const manyptr_const_u8_sentinel_0: Type = .{ .ip_index = .manyptr_const_u8_sentinel_0_type }; pub const slice_const_u8: Type = .{ .ip_index = .slice_const_u8_type }; pub const slice_const_u8_sentinel_0: Type = .{ .ip_index = .slice_const_u8_sentinel_0_type }; +pub const slice_const_slice_const_u8: Type = .{ .ip_index = .slice_const_slice_const_u8_type }; +pub const slice_const_type: Type = .{ .ip_index = .slice_const_type_type }; +pub const optional_type: Type = .{ .ip_index = .optional_type_type }; +pub const optional_noreturn: Type = .{ .ip_index = .optional_noreturn_type }; pub const vector_8_i8: Type = .{ .ip_index = .vector_8_i8_type }; pub const vector_16_i8: Type = .{ .ip_index = .vector_16_i8_type }; |
