Zig Version
0.17.0-dev.813+2153f8143
Steps to Reproduce, Observed Behavior, and Expected Behavior
conststd=@import("std");pubfnmain()!void{vargpa=std.heap.DebugAllocator(.{}){};defer_=gpa.deinit();constallocator=gpa.allocator();varmap=std.AutoHashMap(u32,void).init(allocator);defermap.deinit();constlarge_capacity:usize=3_500_000_000;trymap.ensureTotalCapacity(large_capacity);}zig run a.zig
thread 1611250 panic: integer does not fit in destination type
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/hash_map.zig:736:32: 0x102b58b93 in capacityForSize (a)
var new_cap: u32 = @intCast((@as(u64, size) * 100) / max_load_percentage + 1);
^
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/hash_map.zig:1296:57: 0x102b52d83 in growIfNeeded (a)
try self.grow(allocator, capacityForSize(self.load() + new_count), ctx);
^
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/hash_map.zig:750:38: 0x102b52c27 in ensureTotalCapacityContext (a)
try self.growIfNeeded(allocator, new_size - self.size, ctx);
^
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/hash_map.zig:304:61: 0x102b52af3 in ensureTotalCapacity (a)
return self.unmanaged.ensureTotalCapacityContext(self.allocator, expected_count, self.ctx);
^
/Users/by/project/zig/zig/a.zig:14:32: 0x102b4ef2b in main (a)
try map.ensureTotalCapacity(large_capacity);
^
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/start.zig:739:64: 0x102b4f27b in callMain (a)
if (fn_info.param_types.len == 0) return wrapMain(root.main());
^
???:?:?: 0x18f48bdff in start (/usr/lib/dyld)
fish: Job 1, 'zig run a.zig' terminated by signal SIGABRT (Abort)
### Zig Version
0.17.0-dev.813+2153f8143
### Steps to Reproduce, Observed Behavior, and Expected Behavior
```zig
const std = @import("std");
pub fn main() !void {
var gpa = std.heap.DebugAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
var map = std.AutoHashMap(u32, void).init(allocator);
defer map.deinit();
const large_capacity: usize = 3_500_000_000;
try map.ensureTotalCapacity(large_capacity);
}
```
```
zig run a.zig
thread 1611250 panic: integer does not fit in destination type
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/hash_map.zig:736:32: 0x102b58b93 in capacityForSize (a)
var new_cap: u32 = @intCast((@as(u64, size) * 100) / max_load_percentage + 1);
^
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/hash_map.zig:1296:57: 0x102b52d83 in growIfNeeded (a)
try self.grow(allocator, capacityForSize(self.load() + new_count), ctx);
^
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/hash_map.zig:750:38: 0x102b52c27 in ensureTotalCapacityContext (a)
try self.growIfNeeded(allocator, new_size - self.size, ctx);
^
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/hash_map.zig:304:61: 0x102b52af3 in ensureTotalCapacity (a)
return self.unmanaged.ensureTotalCapacityContext(self.allocator, expected_count, self.ctx);
^
/Users/by/project/zig/zig/a.zig:14:32: 0x102b4ef2b in main (a)
try map.ensureTotalCapacity(large_capacity);
^
/opt/homebrew/Cellar/zig-dev/0.17.0-dev.813+2153f8143/lib/zig/std/start.zig:739:64: 0x102b4f27b in callMain (a)
if (fn_info.param_types.len == 0) return wrapMain(root.main());
^
???:?:?: 0x18f48bdff in start (/usr/lib/dyld)
fish: Job 1, 'zig run a.zig' terminated by signal SIGABRT (Abort)
```