From d092c752f3e2e0e162e9bab57d3f84de6ccde7c9 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 16 Apr 2026 10:07:08 -0700 Subject: [PATCH] std.Io.Writer.print: fix wrong fn signature in docs closes #25963 --- lib/std/Io/Writer.zig | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/std/Io/Writer.zig b/lib/std/Io/Writer.zig index 657d197788..41874eaf11 100644 --- a/lib/std/Io/Writer.zig +++ b/lib/std/Io/Writer.zig @@ -599,11 +599,15 @@ pub fn writeAll(w: *Writer, bytes: []const u8) Error!void { /// - `u`: integer as an UTF-8 sequence. Integer type must have 21 bits at max. /// - `B`: bytes in SI units (decimal) /// - `Bi`: bytes in IEC units (binary) -/// - `?`: optional value as either the unwrapped value, or `null`; may be followed by a format specifier for the underlying value. -/// - `!`: error union value as either the unwrapped value, or the formatted error value; may be followed by a format specifier for the underlying value. +/// - `?`: optional value as either the unwrapped value, or `null`; may be +/// followed by a format specifier for the underlying value. +/// - `!`: error union value as either the unwrapped value, or the formatted +/// error value; may be followed by a format specifier for the underlying +/// value. /// - `*`: the address of the value instead of the value itself. /// - `any`: a value of any type using its default format. -/// - `f`: delegates to a method on the type named "format" with the signature `fn (*Writer, args: anytype) Writer.Error!void`. +/// - `f`: delegates to the `format` method of the type, passing `*Writer` and +/// expecting `Error!void` returned. /// /// A user type may be a struct, vector, union or enum type. ///