aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorJackson Wambolt <jtwambolt@gmail.com>2025-06-28 19:33:38 -0500
committerMatthew Lugg <mlugg@mlugg.co.uk>2025-07-31 22:28:46 +0100
commit264bd7053edb948d0f96525b54b859c0422e12a2 (patch)
tree35ea671688ad92693f4579c6de89f9a1f6e3b98e /src/Sema.zig
parentac1e73e249f8ce06bc7c89d2bdc4359b0399236c (diff)
downloadzig-264bd7053edb948d0f96525b54b859c0422e12a2.tar.gz
zig-264bd7053edb948d0f96525b54b859c0422e12a2.zip
Sema: remove incorrect `requireRuntimeBlock` calls
Part of #22353 Resolves: #24273 Co-Authored-By: Matthew Lugg <mlugg@mlugg.co.uk>
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index f81bb15f87..d7add0724d 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -19572,7 +19572,7 @@ fn structInitAnon(
try sema.declareDependency(.{ .interned = struct_ty });
try sema.addTypeReferenceEntry(src, struct_ty);
- const runtime_index = opt_runtime_index orelse {
+ _ = opt_runtime_index orelse {
const struct_val = try pt.intern(.{ .aggregate = .{
.ty = struct_ty,
.storage = .{ .elems = values },
@@ -19580,11 +19580,6 @@ fn structInitAnon(
return sema.addConstantMaybeRef(struct_val, is_ref);
};
- try sema.requireRuntimeBlock(block, LazySrcLoc.unneeded, block.src(.{ .init_elem = .{
- .init_node_offset = src.offset.node_offset.x,
- .elem_index = @intCast(runtime_index),
- } }));
-
if (is_ref) {
const target = zcu.getTarget();
const alloc_ty = try pt.ptrTypeSema(.{
@@ -19713,7 +19708,7 @@ fn zirArrayInit(
if (!comptime_known) break @intCast(i);
} else null;
- const runtime_index = opt_runtime_index orelse {
+ _ = opt_runtime_index orelse {
const elem_vals = try sema.arena.alloc(InternPool.Index, resolved_args.len);
for (elem_vals, resolved_args) |*val, arg| {
// We checked that all args are comptime above.
@@ -19728,11 +19723,6 @@ fn zirArrayInit(
return sema.addConstantMaybeRef(result_val.toIntern(), is_ref);
};
- try sema.requireRuntimeBlock(block, LazySrcLoc.unneeded, block.src(.{ .init_elem = .{
- .init_node_offset = src.offset.node_offset.x,
- .elem_index = runtime_index,
- } }));
-
if (is_ref) {
const target = zcu.getTarget();
const alloc_ty = try pt.ptrTypeSema(.{