mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
langref: Clear up terminology used for top-level doc comments
This commit is contained in:
+2
-2
@@ -429,7 +429,7 @@
|
||||
{#header_open|Top-Level Doc Comments#}
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
It is a compile error if a top-level doc comment is not placed at the start
|
||||
@@ -2470,7 +2470,7 @@ or
|
||||
<p>Unions can be declared with an enum tag type.
|
||||
This turns the union into a <em>tagged</em> 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#}.
|
||||
</p>
|
||||
{#code|test_tagged_union.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.
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user