From 0e37ff0d591dd75ceec9208196bec29efaec607a Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 27 Jun 2025 20:05:22 -0700 Subject: std.fmt: breaking API changes added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string --- src/Zcu.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Zcu.zig') diff --git a/src/Zcu.zig b/src/Zcu.zig index a815921cf0..3b54acc40b 100644 --- a/src/Zcu.zig +++ b/src/Zcu.zig @@ -2811,7 +2811,7 @@ comptime { } pub fn loadZirCache(gpa: Allocator, cache_file: std.fs.File) !Zir { - return loadZirCacheBody(gpa, try cache_file.reader().readStruct(Zir.Header), cache_file); + return loadZirCacheBody(gpa, try cache_file.deprecatedReader().readStruct(Zir.Header), cache_file); } pub fn loadZirCacheBody(gpa: Allocator, header: Zir.Header, cache_file: std.fs.File) !Zir { -- cgit v1.2.3