| ... | ... | @@ -3073,7 +3073,11 @@ pub const Type = extern union { |
| 3073 | 3073 | single_const_pointer_to_comptime_int, |
| 3074 | 3074 | anyerror_void_error_union, |
| 3075 | 3075 | @"anyframe", |
| 3076 | | const_slice_u8, // See last_no_payload_tag below. |
| 3076 | const_slice_u8, |
| 3077 | /// This is a special value that tracks a set of types that have been stored |
| 3078 | /// to an inferred allocation. It does not support most of the normal type queries. |
| 3079 | /// However it does respond to `isConstPtr`, `ptrSize`, `zigTypeTag`, etc. |
| 3080 | inferred_alloc, // See last_no_payload_tag below. |
| 3077 | 3081 | // After this, the tag requires a payload. |
| 3078 | 3082 | |
| 3079 | 3083 | array_u8, |
| ... | ... | @@ -3100,12 +3104,8 @@ pub const Type = extern union { |
| 3100 | 3104 | error_set, |
| 3101 | 3105 | error_set_single, |
| 3102 | 3106 | empty_struct, |
| 3103 | | /// This is a special value that tracks a set of types that have been stored |
| 3104 | | /// to an inferred allocation. It does not support most of the normal type queries. |
| 3105 | | /// However it does respond to `isConstPtr`, `ptrSize`, `zigTypeTag`, etc. |
| 3106 | | inferred_alloc, |
| 3107 | 3107 | |
| 3108 | | pub const last_no_payload_tag = Tag.const_slice_u8; |
| 3108 | pub const last_no_payload_tag = Tag.inferred_alloc; |
| 3109 | 3109 | pub const no_payload_count = @enumToInt(last_no_payload_tag) + 1; |
| 3110 | 3110 | |
| 3111 | 3111 | pub fn Type(comptime t: Tag) type { |
| ... | ... | @@ -3152,6 +3152,7 @@ pub const Type = extern union { |
| 3152 | 3152 | .anyerror_void_error_union, |
| 3153 | 3153 | .@"anyframe", |
| 3154 | 3154 | .const_slice_u8, |
| 3155 | .inferred_alloc, |
| 3155 | 3156 | => @compileError("Type Tag " ++ @tagName(t) ++ " has no payload"), |
| 3156 | 3157 | |
| 3157 | 3158 | .array_u8, |
| ... | ... | @@ -3184,7 +3185,6 @@ pub const Type = extern union { |
| 3184 | 3185 | .error_set => Payload.Decl, |
| 3185 | 3186 | .error_set_single => Payload.Name, |
| 3186 | 3187 | .empty_struct => Payload.ContainerScope, |
| 3187 | | .inferred_alloc => Payload.InferredAlloc, |
| 3188 | 3188 | }; |
| 3189 | 3189 | } |
| 3190 | 3190 | |
| ... | ... | @@ -3298,13 +3298,6 @@ pub const Type = extern union { |
| 3298 | 3298 | base: Payload, |
| 3299 | 3299 | data: *Module.Scope.Container, |
| 3300 | 3300 | }; |
| 3301 | | |
| 3302 | | pub const InferredAlloc = struct { |
| 3303 | | pub const base_tag = Tag.inferred_alloc; |
| 3304 | | |
| 3305 | | base: Payload = .{ .tag = base_tag }, |
| 3306 | | data: *Value.Payload.InferredAlloc, |
| 3307 | | }; |
| 3308 | 3301 | }; |
| 3309 | 3302 | }; |
| 3310 | 3303 | |