std.fmt.format: use {t} for tag name rather than {s}

prevents footgun when formatted type changes from string to enum
This commit is contained in:
Andrew Kelley
2025-07-03 18:50:16 -07:00
parent 30c2921eb8
commit 9c8aef55b4
12 changed files with 39 additions and 29 deletions

View File

@@ -11406,7 +11406,7 @@ pub fn dumpGenericInstancesFallible(ip: *const InternPool, allocator: Allocator)
var it = instances.iterator();
while (it.next()) |entry| {
const generic_fn_owner_nav = ip.getNav(ip.funcDeclInfo(entry.key_ptr.*).owner_nav);
try stderr_bw.print("{f} ({f}): \n", .{ generic_fn_owner_nav.name.fmt(ip), entry.value_ptr.items.len });
try stderr_bw.print("{f} ({d}): \n", .{ generic_fn_owner_nav.name.fmt(ip), entry.value_ptr.items.len });
for (entry.value_ptr.items) |index| {
const unwrapped_index = index.unwrap(ip);
const func = ip.extraFuncInstance(unwrapped_index.tid, unwrapped_index.getExtra(ip), unwrapped_index.getData(ip));