File tree 1 file changed +12
-24
lines changed
1 file changed +12
-24
lines changed Original file line number Diff line number Diff line change @@ -2374,6 +2374,18 @@ pub const Type = extern union {
2374
2374
.error_union ,
2375
2375
.error_set ,
2376
2376
.error_set_merged ,
2377
+ .anyframe_T ,
2378
+ .optional_single_mut_pointer ,
2379
+ .optional_single_const_pointer ,
2380
+ .single_const_pointer ,
2381
+ .single_mut_pointer ,
2382
+ .many_const_pointer ,
2383
+ .many_mut_pointer ,
2384
+ .c_const_pointer ,
2385
+ .c_mut_pointer ,
2386
+ .const_slice ,
2387
+ .mut_slice ,
2388
+ .pointer ,
2377
2389
= > return true ,
2378
2390
2379
2391
// These are false because they are comptime-only types.
@@ -2399,30 +2411,6 @@ pub const Type = extern union {
2399
2411
.fn_ccc_void_no_args ,
2400
2412
= > return false ,
2401
2413
2402
- // These types have more than one possible value, so the result is the same as
2403
- // asking whether they are comptime-only types.
2404
- .anyframe_T ,
2405
- .optional_single_mut_pointer ,
2406
- .optional_single_const_pointer ,
2407
- .single_const_pointer ,
2408
- .single_mut_pointer ,
2409
- .many_const_pointer ,
2410
- .many_mut_pointer ,
2411
- .c_const_pointer ,
2412
- .c_mut_pointer ,
2413
- .const_slice ,
2414
- .mut_slice ,
2415
- .pointer ,
2416
- = > {
2417
- if (ignore_comptime_only ) {
2418
- return true ;
2419
- } else if (sema_kit ) | sk | {
2420
- return ! (try sk .sema .typeRequiresComptime (sk .block , sk .src , ty ));
2421
- } else {
2422
- return ! comptimeOnly (ty );
2423
- }
2424
- },
2425
-
2426
2414
.optional = > {
2427
2415
var buf : Payload.ElemType = undefined ;
2428
2416
const child_ty = ty .optionalChild (& buf );
You can’t perform that action at this time.
0 commit comments