authorgravatar for me@nanzho.ngNan Zhong <me@nanzho.ng> 2023-12-04 19:40:07-05:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-12-05 10:17:36+02:00
log72568c131dcfc9303de0a809e02290c7ac464663
treedd7edded4e2887cb1313b34f2fdf51d5c7233f18
parentc357b902b0b76806970462ab3b274d8ade76e35a

langref: fix incorrect reference to string literal


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

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