From ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 27 Nov 2022 01:07:35 -0700 Subject: std.mem.Allocator: allow shrink to fail closes #13535 --- lib/std/meta/trailer_flags.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/std/meta') diff --git a/lib/std/meta/trailer_flags.zig b/lib/std/meta/trailer_flags.zig index 212a47bc29..34fb17eb0a 100644 --- a/lib/std/meta/trailer_flags.zig +++ b/lib/std/meta/trailer_flags.zig @@ -144,7 +144,7 @@ test "TrailerFlags" { .b = true, .c = true, }); - const slice = try testing.allocator.allocAdvanced(u8, 8, flags.sizeInBytes(), .exact); + const slice = try testing.allocator.alignedAlloc(u8, 8, flags.sizeInBytes()); defer testing.allocator.free(slice); flags.set(slice.ptr, .b, false); -- cgit v1.2.3