| ... | @@ -602,32 +602,32 @@ test failing { | ... | @@ -602,32 +602,32 @@ test failing { |
| 602 | test "free single-pointer to array" { | 602 | test "free single-pointer to array" { |
| 603 | const allocator = std.testing.allocator; | 603 | const allocator = std.testing.allocator; |
| 604 | { | 604 | { |
| 605 | const slice = allocator.alloc(u32, 128) catch return error.SkipZigTest; | 605 | const allocation = try allocator.alloc(u32, 128); |
| 606 | slice[127] = 0; | 606 | allocation[127] = 0; |
| 607 | const ptr = slice[0..127 :0]; | 607 | const ptr: *[127:0]u32 = allocation[0..127 :0]; |
| 608 | allocator.free(ptr); | 608 | allocator.free(ptr); |
| 609 | } | 609 | } |
| 610 | { | 610 | { |
| 611 | const slice = allocator.alloc(u32, 128) catch return error.SkipZigTest; | 611 | const allocation = try allocator.alloc(u32, 128); |
| 612 | slice[127] = 0; | 612 | allocation[127] = 0; |
| 613 | const ptr = slice[0..127 :0]; | 613 | const ptr: *[127:0]u32 = allocation[0..127 :0]; |
| 614 | if (allocator.resize(ptr, 16)) { | 614 | if (allocator.resize(ptr, 16)) { |
| 615 | allocator.free(ptr[0..16]); | 615 | allocator.free(ptr[0..16]); |
| 616 | } else allocator.free(ptr); | 616 | } else allocator.free(ptr); |
| 617 | } | 617 | } |
| 618 | { | 618 | { |
| 619 | const slice = allocator.alloc(u32, 128) catch return error.SkipZigTest; | 619 | const allocation = try allocator.alloc(u32, 128); |
| 620 | slice[127] = 0; | 620 | allocation[127] = 0; |
| 621 | const ptr = slice[0..127 :0]; | 621 | const ptr: *[127:0]u32 = allocation[0..127 :0]; |
| 622 | if (allocator.remap(ptr, 16)) |new| { | 622 | if (allocator.remap(ptr, 16)) |new| { |
| 623 | allocator.free(new); | 623 | allocator.free(new); |
| 624 | } else allocator.free(ptr); | 624 | } else allocator.free(ptr); |
| 625 | } | 625 | } |
| 626 | { | 626 | { |
| 627 | const slice = allocator.alloc(u32, 128) catch return error.SkipZigTest; | 627 | const allocation = try allocator.alloc(u32, 128); |
| 628 | slice[127] = 0; | 628 | allocation[127] = 0; |
| 629 | const ptr = slice[0..127 :0]; | 629 | const ptr: *[127:0]u32 = allocation[0..127 :0]; |
| 630 | const new = allocator.realloc(ptr, 16) catch return error.SkipZigTest; | 630 | const new = try allocator.realloc(ptr, 16); |
| 631 | allocator.free(new); | 631 | allocator.free(new); |
| 632 | } | 632 | } |
| 633 | } | 633 | } |