Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

langref improvements #22714

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

langref improvements #22714

wants to merge 3 commits into from

Conversation

mlugg
Copy link
Member

@mlugg mlugg commented Feb 1, 2025

No description provided.

@mlugg mlugg added the docs label Feb 1, 2025
@mlugg mlugg requested a review from andrewrk February 1, 2025 19:47
Also standardise the terms "safety-checked" and "unchecked".
doc/langref/std_options.zig Outdated Show resolved Hide resolved
<ul>
<li>If a call to {#syntax#}@import{#endsyntax#} is analyzed, the file being imported is analyzed.</li>
<li>If a type (including a file) is analyzed, all {#syntax#}comptime{#endsyntax#}, {#syntax#}usingnamespace{#endsyntax#}, and {#syntax#}export{#endsyntax#} declarations within it are analyzed.</li>
<li>If a type (including a file) is analyzed, and the compilation is for a {#link|test|Zig Test#}, and the module the type is within is the root module of the compiatilation, then all {#syntax#}test{#endsyntax#} declarations within it are also analyzed.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li>If a type (including a file) is analyzed, and the compilation is for a {#link|test|Zig Test#}, and the module the type is within is the root module of the compiatilation, then all {#syntax#}test{#endsyntax#} declarations within it are also analyzed.</li>
<li>If a type (including a file) is analyzed, and the compilation is for a {#link|test|Zig Test#}, and the module the type is within is the root module of the compilation, then all {#syntax#}test{#endsyntax#} declarations within it are also analyzed.</li>

foo: u32,
bar: u64,

/// `@This()` can be used to refer to this struct type. In files with fields, is quite common to name the type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// `@This()` can be used to refer to this struct type. In files with fields, is quite common to name the type
/// `@This()` can be used to refer to this struct type. In files with fields, it is quite common to name the type

/// * `u8`
/// * `E!u8`, for any error set `E`
/// Returning a `void` value from this function will exit with code 0.
/// Returning a `u8` value from this function with exit with the given status code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Returning a `u8` value from this function with exit with the given status code.
/// Returning a `u8` value from this function will exit with the given status code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants