diff --git a/lib/std/fmt.zig b/lib/std/fmt.zig index be4b0989c7..f4926ae8d7 100644 --- a/lib/std/fmt.zig +++ b/lib/std/fmt.zig @@ -80,7 +80,7 @@ fn peekIsAlign(comptime fmt: []const u8) bool { /// /// If a formatted user type contains a function of the type /// ``` -/// fn format(value: ?, comptime fmt: []const u8, options: std.fmt.FormatOptions, context: var, comptime Errors: type, output: fn (@typeOf(context), []const u8) Errors!void) Errors!void +/// fn format(value: ?, comptime fmt: []const u8, options: std.fmt.FormatOptions, context: var, comptime Errors: type, output: fn (@TypeOf(context), []const u8) Errors!void) Errors!void /// ``` /// with `?` being the type formatted, this function will be called instead of the default implementation. /// This allows user types to be formatted in a logical manner instead of dumping all fields of the type. diff --git a/lib/std/thread.zig b/lib/std/thread.zig index fea045288a..dcc762f30e 100644 --- a/lib/std/thread.zig +++ b/lib/std/thread.zig @@ -138,7 +138,7 @@ pub const Thread = struct { }; /// caller must call wait on the returned thread - /// fn startFn(@typeOf(context)) T + /// fn startFn(@TypeOf(context)) T /// where T is u8, noreturn, void, or !void /// caller must call wait on the returned thread pub fn spawn(context: var, comptime startFn: var) SpawnError!*Thread { diff --git a/lib/std/zig/parser_test.zig b/lib/std/zig/parser_test.zig index fd7c841d86..ba022eec95 100644 --- a/lib/std/zig/parser_test.zig +++ b/lib/std/zig/parser_test.zig @@ -1071,7 +1071,7 @@ test "zig fmt: line comment after doc comment" { test "zig fmt: float literal with exponent" { try testCanonical( \\test "bit field alignment" { - \\ assert(@typeOf(&blah.b) == *align(1:3:6) const u3); + \\ assert(@TypeOf(&blah.b) == *align(1:3:6) const u3); \\} \\ ); @@ -2604,7 +2604,7 @@ test "zig fmt: comments at several places in struct init" { try testTransform( \\var bar = Bar{ \\ .x = 10, // test - \\ .y = "test" + \\ .y = "test" \\ // test \\}; \\