Change:
grammar, but a Rust parser will reject everything but the 12 special cases mentioned in [Number literals](#number-literals) below. <ins> #### Examples ##### Characters and strings |   | Example | Number of `#` pairs allowed | Available characters | Escapes | Equivalent to | |---|---------|-----------------------------|----------------------|---------|---------------| | [Character](#character-literals) | `'H'` | `N/A` | All unicode | `'` & [Byte escapes](#byte-escapes) & [Unicode escapes](#unicode-escapes) | `N/A` | | [String](#string-literals) | `"hello"` | `N/A` | All unicode | `"` & [Byte escapes](#byte-escapes) & [Unicode escapes](#unicode-escapes) | `N/A` | | [Raw](#raw-string-literals) | `r##"hello"##`  | `0...` | All unicode | `N/A` | `N/A` | | [Byte](#byte-literals) | `b'H'` | `N/A` | All ASCII | `'` & [Byte escapes](#byte-escapes) | `u8` | | [Byte string](#byte-string-literals) | `b"hello"` | `N/A`  | All ASCII | `"` & [Byte escapes](#byte-escapes) | `&'static [u8]` | | [Raw byte string](#raw-byte-string-literals) | `br##"hello"##` | `0...` | All ASCII | `N/A` | `&'static [u8]` (unsure...not stated) | ##### Byte escapes |   | Name | |---|------| | `x7F` | 8-bit character code (exactly 2 digits) | | `n` | Newline | | `r` | Carriage return | | `t` | Tab | | `` | Backslash | ##### Unicode escapes |   | Name | |---|------| | `u7FFF` | 16-bit character code (exactly 4 digits) | | `U7EEEFFFF` | 32-bit character code (exactly 8 digits) | ##### Numbers | [Number literals](#number-literals)`*` | Example | Exponentiation | Suffixes | |----------------------------------------|---------|----------------|----------| | Decimal integer | `98_222i` | `N/A` | Integer suffixes | | Hex integer | `0xffi` | `N/A` | Integer suffixes | | Octal integer | `0o77i` | `N/A` | Integer suffixes | | Binary integer | `0b1111_0000i` | `N/A` | Integer suffixes | | Floating-point | `123.0E+77f64` | `Optional` | Floating-point suffixes | `*` All number literals allow `_` as a visual separator: `1_234.0E+18f64` ##### Suffixes | Integer | Floating-point | |---------|----------------| | `i` (`int`), `u` (`uint`), `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64`, `i64` | `f32`, `f64` | </ins> #### Character and string literals ```{.ebnf .gram}

Discussion:
The doesn't document what escape sequences are valid if any. For example, documentation doesn't state whether this will match a newline as would be expected: It also doesn't specify what format these strings are supposed to be written in. Much of the documentation including many escape sequences are documented in the but it is difficult (slow) to parse as it is. I think it would be good to have it in or at least to make the reference more clear. More escape documentation is in (though it's not exactly related). For what it's worth, doesn't seem to document it either (at least, I couldn't find it). Below is my first shot at what it could look like. followed by any number (including zero) of 's followed by and closed in the reverse: A single ASCII character: A sequence of ASCII characters: Note: I'm not really familiar with all the string formats. I'm just to collect them together so they're more obvious. Does it make sense to collect them onto the  page? If so, I can probably submit a PR making something like this but I'm not sure where it should go.
Python , but in the language reference rather than the standard library documentation. Perhaps Rust’s escape sequences should be documented in the reference, where most other language-documenting features go.
Horizontal Tab, AKA t, ASCII/Unicode 9. See .
Oh, I completely misread this as 6 escapes (but it's 3 with their definitions). The .
I'm quite surprised to find that Rust doesn't have (i.e: 'backspace') built in to the language. Is there a particular reason for this?
asking on is a better place than on a three and a half year old issue.