szn

Bug 340 — std.StringHashMap and std.AutoHashMap use managed (pre-0.16) API

340. Managed hash-map types — FALSE POSITIVE

Files: N/A Severity: HIGH (downgraded) Status: ❌ FALSE POSITIVE

Verification: A standalone test confirming all managed HashMap APIs work without deprecation warnings:

test "StringHashMap still works" {
    var map = std.StringHashMap(i32).init(testing.allocator);
    defer map.deinit();
    try map.put("hello", 42);
}

test "AutoHashMap still works" {
    var map = std.AutoHashMap(i32, []const u8).init(testing.allocator);
    defer map.deinit();
    try map.put(1, "one");
}

Result: all pass, zero deprecation warnings.

Evidence from std lib source (hash_map.zig):

The only deprecation notice in hash_map.zig is a doc comment on HashMapUnmanaged: “Default initialization of this struct is deprecated; use .empty instead.” This is about = .{} vs = .empty, not about the managed types.

No code changes needed.