Skip to content

Commit 72568c1

Browse files
nanzhongVexu
authored andcommitted
langref: fix incorrect reference to string literal
1 parent c357b90 commit 72568c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/langref.html.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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'#}

0 commit comments

Comments
 (0)