Skip to content

Commit

Permalink
langref: fix incorrect reference to string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
nanzhong authored and Vexu committed Dec 5, 2023
1 parent c357b90 commit 72568c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/langref.html.in
Original file line number Diff line number Diff line change
Expand Up @@ -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'#}
Expand Down

0 comments on commit 72568c1

Please sign in to comment.