From 153521279f96dbbb3179c8b92138ad126626adf8 Mon Sep 17 00:00:00 2001 From: Nashwan Azhari Date: Wed, 12 Nov 2025 00:41:37 +0200 Subject: [PATCH 1/2] docs: remove normal-doc comment interleaving bug note. Signed-off-by: Nashwan Azhari --- doc/langref.html.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index b1768e8bbd..5c6943c9f4 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -421,8 +421,7 @@ {#code|unattached_doc-comment.zig#}

- Doc comments can be interleaved with normal comments. Currently, when producing - the package documentation, normal comments are merged with doc comments. + Doc comments can be interleaved with normal comments, which are ignored.

{#header_close#} {#header_open|Top-Level Doc Comments#} From af7dec94c636769741e746090c9bd0590e3bbc22 Mon Sep 17 00:00:00 2001 From: Nashwan Azhari Date: Wed, 12 Nov 2025 00:52:30 +0200 Subject: [PATCH 2/2] docs: use custom error set in `values.zig` sample. Signed-off-by: Nashwan Azhari --- doc/langref/values.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/langref/values.zig b/doc/langref/values.zig index 3061bc771b..26d51f638f 100644 --- a/doc/langref/values.zig +++ b/doc/langref/values.zig @@ -4,6 +4,11 @@ const std = @import("std"); const os = std.os; const assert = std.debug.assert; +// Custom error set definition: +const ExampleErrorSet = error{ + ExampleErrorVariant, +}; + pub fn main() void { // integers const one_plus_one: i32 = 1 + 1; @@ -36,7 +41,7 @@ pub fn main() void { }); // error union - var number_or_error: anyerror!i32 = error.ArgNotFound; + var number_or_error: ExampleErrorSet!i32 = ExampleErrorSet.ExampleErrorVariant; print("\nerror union 1\ntype: {}\nvalue: {!}\n", .{ @TypeOf(number_or_error),