diff --git a/lib/std/mem/Allocator.zig b/lib/std/mem/Allocator.zig index f16944bb7a934071acb8c89808f1560c2e08df9c..1f11c637b0168068004019b8839458f021d679f5 100644 --- a/lib/std/mem/Allocator.zig +++ b/lib/std/mem/Allocator.zig @@ -454,7 +454,7 @@ pub fn reallocAdvanced( pub fn free(self: Allocator, memory: anytype) void { const slice_info = @typeInfo(@TypeOf(memory)).pointer; if (slice_info.size != .slice) { - assert(slice_info.size == .one and @typeInfo(slice_info.child) == .array); + comptime assert(slice_info.size == .one and @typeInfo(slice_info.child) == .array); } const bytes: []u8 = @ptrCast(@constCast(mem.absorbSentinel(memory))); if (bytes.len == 0) return;