authorgravatar for rb.lymn@gmail.comRobbie Lyman <rb.lymn@gmail.com> 2026-08-06 22:26:40-04:00
committergravatar for rb.lymn@gmail.comRobbie Lyman <rb.lymn@gmail.com> 2026-08-06 22:26:51-04:00
log89069b54d9f3a83ac675c6a18df2c4a52d019835
tree69e6308effe281976f32c03697ced9ef47503a40
parentb470382173c6be27f6cdd46c3adce0e59f2b3675

fix(Allocator.free): restore compile error


1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/mem/Allocator.zig+1-1
...@@ -454,7 +454,7 @@ pub fn reallocAdvanced(...@@ -454,7 +454,7 @@ pub fn reallocAdvanced(
454pub fn free(self: Allocator, memory: anytype) void {454pub fn free(self: Allocator, memory: anytype) void {
455 const slice_info = @typeInfo(@TypeOf(memory)).pointer;455 const slice_info = @typeInfo(@TypeOf(memory)).pointer;
456 if (slice_info.size != .slice) {456 if (slice_info.size != .slice) {
457 assert(slice_info.size == .one and @typeInfo(slice_info.child) == .array);457 comptime assert(slice_info.size == .one and @typeInfo(slice_info.child) == .array);
458 }458 }
459 const bytes: []u8 = @ptrCast(@constCast(mem.absorbSentinel(memory)));459 const bytes: []u8 = @ptrCast(@constCast(mem.absorbSentinel(memory)));
460 if (bytes.len == 0) return;460 if (bytes.len == 0) return;