zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 72568c131dcfc9303de0a809e02290c7ac464663 (tree)
parent c357b902b0b76806970462ab3b274d8ade76e35a
Author: Nan Zhong <me@nanzho.ng>
Date:   Mon,  4 Dec 2023 19:40:07 -0500

langref: fix incorrect reference to string literal

Diffstat:
Mdoc/langref.html.in | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/langref.html.in b/doc/langref.html.in @@ -10595,7 +10595,7 @@ pub fn main() !void { {#header_close#} {#header_open|Where are the bytes?#} - <p>String literals such as {#syntax#}"foo"{#endsyntax#} are in the global constant data section. + <p>String literals such as {#syntax#}"hello"{#endsyntax#} are in the global constant data section. This is why it is an error to pass a string literal to a mutable slice, like this: </p> {#code_begin|test_err|test_string_literal_to_slice|expected type '[]u8', found '*const [5:0]u8'#}