From f0649e77097a44e0f99f79715e2f7c1a7f4cb23b Mon Sep 17 00:00:00 2001 From: Sage Hane Date: Fri, 17 Apr 2026 16:12:10 +0900 Subject: [PATCH] langref: Clear up terminology used for top-level doc comments --- doc/langref.html.in | 4 ++-- doc/langref/tldoc_comments.zig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 53ccac48038fb95001af69ada00bcadc8d82f1a7..3486bef867a7c1238cfd6a332b5a3454b37cb154 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -429,7 +429,7 @@ {#header_open|Top-Level Doc Comments#}

A top-level doc comment is one that begins with two slashes and an exclamation - point: {#syntax#}//!{#endsyntax#}; it documents the current module. + point: {#syntax#}//!{#endsyntax#}; it documents the current source file.

It is a compile error if a top-level doc comment is not placed at the start @@ -2470,7 +2470,7 @@ or

Unions can be declared with an enum tag type. This turns the union into a tagged union, which makes it eligible to use with {#link|switch#} expressions. When switching on tagged unions, - the tag value can be obtained using an additional capture. + the tag value can be obtained using an additional capture. Tagged unions coerce to their tag type: {#link|Type Coercion: Unions and Enums#}.

{#code|test_tagged_union.zig#} diff --git a/doc/langref/tldoc_comments.zig b/doc/langref/tldoc_comments.zig index 6605aac76a057963e799548d70f48c182fed45e1..2e2aec2593e46fc6f7ed233e13a0dc8719ef88ae 100644 --- a/doc/langref/tldoc_comments.zig +++ b/doc/langref/tldoc_comments.zig @@ -3,8 +3,8 @@ //! depend on libc, but will use functions from it if available. const S = struct { - //! Top level comments are allowed inside a container other than a module, - //! but it is not very useful. Currently, when producing the package + //! Top level comments are allowed inside containers other than source + //! files, but it is not very useful. Currently, when producing the package //! documentation, these comments are ignored. }; -- 2.54.0