authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-12 18:50:04-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-12 18:50:39-07:00
log613c03321a0970cce3a5d04ede04ab4a24ac1dbb
tree9b2d72f4f8721df6c5254ee2b3801354539fba83
parent3ec6d655dd61ed5fd0a0d33e33e58b12d5b658f5

langref: fix typos

introduced in ac8a8d0c5996bbf627438768e3c23154a6404183

1 files changed, 2 insertions(+), 2 deletions(-)

doc/langref.html.in+2-2
......@@ -5015,12 +5015,12 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
50155015 in an API runs the risk of introducing dead code into the codebase,
50165016 unnoticed. For example, if the field is ever renamed, code which uses
50175017 {#syntax#}@hasDecl{#endsyntax#} will compile successfully while failing
5018 to enable or disable an intended block of code. Even a simple a typo in
5018 to enable or disable an intended block of code. Even a simple typo in
50195019 the field name passed to {#syntax#}@hasDecl{#endsyntax#} would go
50205020 unnoticed by the compiler. Thus, it is safer to use alternative methods
50215021 to check for the presence or absence of a particular declaration where
50225022 possible. For example, if the target operating system would indicate whether a particular
5023 function is available, it more maintainable to check
5023 function is available, it is more maintainable to check
50245024 {#syntax#}@import("builtin").target.os.tag{#endsyntax#} rather than
50255025 {#syntax#}@hasDecl{#endsyntax#}.</p>
50265026