0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std/mem
Robbie Lyman f3544a7079 fix: Allocator contract should allow free on single-pointer-to-array
Currently, when calling `free` a slice created by slicing a pointer with
comptime-known start and end, a compile-time assertion is hit, because
the slicing results in `*[len]T` rather than the expected `[]T`.

This commit allows `Allocator.free` to be called on such pointers as
well.

closes #35712
History 2026-06-25 02:09:34 +02:00
..
Allocator.zig fix: Allocator contract should allow free on single-pointer-to-array 2026-06-25 02:09:34 +02:00