Skip to content

Commit 0809eaa

Browse files
committed
Rollup merge of #29438 - jethrogb:topic/book-rbstrlit, r=alexcrichton
The raw byte string literal syntax in the syntax index was incorrect. Also added links to the reference for raw and/or byte string literals.
2 parents 319e97b + 14eef41 commit 0809eaa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/doc/trpl/syntax-index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@
100100
* `'ident`: named lifetime or loop label. See [Lifetimes], [Loops (Loops Labels)].
101101
* `…u8`, `…i32`, `…f64`, `…usize`, …: numeric literal of specific type.
102102
* `"…"`: string literal. See [Strings].
103-
* `r"…"`, `r#"…"#`, `r##"…"##`, …: raw string literal.
104-
* `b"…"`: byte string literal.
105-
* `rb"…"`, `rb#"…"#`, `rb##"…"##`, …: raw byte string literal.
103+
* `r"…"`, `r#"…"#`, `r##"…"##`, …: raw string literal, escape characters are not processed. See [Reference (Raw String Literals)].
104+
* `b"…"`: byte string literal, constructs a `[u8]` instead of a string. See [Reference (Byte String Literals)].
105+
* `br"…"`, `br#"…"#`, `br##"…"##`, …: raw byte string literal, combination of raw and byte string literal. See [Reference (Raw Byte String Literals)].
106106
* `'…'`: character literal. See [Primitive Types (`char`)].
107107
* `b'…'`: ASCII byte literal.
108108

@@ -219,6 +219,9 @@
219219
[Primitive Types (Tuple Indexing)]: primitive-types.html#tuple-indexing
220220
[Primitive Types (Tuples)]: primitive-types.html#tuples
221221
[Raw Pointers]: raw-pointers.html
222+
[Reference (Byte String Literals)]: ../reference.html#byte-string-literals
223+
[Reference (Raw Byte String Literals)]: ../reference.html#raw-byte-string-literals
224+
[Reference (Raw String Literals)]: ../reference.html#raw-string-literals
222225
[References and Borrowing]: references-and-borrowing.html
223226
[Strings]: strings.html
224227
[Structs (Update syntax)]: structs.html#update-syntax

0 commit comments

Comments
 (0)