Skip to content

Commit 14eef41

Browse files
author
Jethro Beekman
committed
Book: Update raw/byte string literal in syntax index
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.
1 parent 65623db commit 14eef41

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
@@ -99,9 +99,9 @@
9999
* `'ident`: named lifetime or loop label. See [Lifetimes], [Loops (Loops Labels)].
100100
* `…u8`, `…i32`, `…f64`, `…usize`, …: numeric literal of specific type.
101101
* `"…"`: string literal. See [Strings].
102-
* `r"…"`, `r#"…"#`, `r##"…"##`, …: raw string literal.
103-
* `b"…"`: byte string literal.
104-
* `rb"…"`, `rb#"…"#`, `rb##"…"##`, …: raw byte string literal.
102+
* `r"…"`, `r#"…"#`, `r##"…"##`, …: raw string literal, escape characters are not processed. See [Reference (Raw String Literals)].
103+
* `b"…"`: byte string literal, constructs a `[u8]` instead of a string. See [Reference (Byte String Literals)].
104+
* `br"…"`, `br#"…"#`, `br##"…"##`, …: raw byte string literal, combination of raw and byte string literal. See [Reference (Raw Byte String Literals)].
105105
* `'…'`: character literal. See [Primitive Types (`char`)].
106106
* `b'…'`: ASCII byte literal.
107107

@@ -217,6 +217,9 @@
217217
[Primitive Types (Tuple Indexing)]: primitive-types.html#tuple-indexing
218218
[Primitive Types (Tuples)]: primitive-types.html#tuples
219219
[Raw Pointers]: raw-pointers.html
220+
[Reference (Byte String Literals)]: ../reference.html#byte-string-literals
221+
[Reference (Raw Byte String Literals)]: ../reference.html#raw-byte-string-literals
222+
[Reference (Raw String Literals)]: ../reference.html#raw-string-literals
220223
[References and Borrowing]: references-and-borrowing.html
221224
[Strings]: strings.html
222225
[Structs (Update syntax)]: structs.html#update-syntax

0 commit comments

Comments
 (0)