mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
std.ArrayList: use variable for local mutable state
stage1 has the wrong semantics here
This commit is contained in:
parent
491e3ba6b1
commit
0f3e849719
@ -1424,7 +1424,8 @@ test "ArrayListAligned/ArrayListAlignedUnmanaged accepts unaligned slices" {
|
||||
|
||||
test "std.ArrayList(u0)" {
|
||||
// An ArrayList on zero-sized types should not need to allocate
|
||||
const a = testing.FailingAllocator.init(testing.allocator, 0).allocator();
|
||||
var failing_allocator = testing.FailingAllocator.init(testing.allocator, 0);
|
||||
const a = failing_allocator.allocator();
|
||||
|
||||
var list = ArrayList(u0).init(a);
|
||||
defer list.deinit();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user