rollup merge of #22072: geofft/doc-byte-string-literal
This was correct in the EBNF, but not in the prose (which seems to have been copied-and-pasted from regular string literals).
This commit is contained in:
commit
577c51cdc0
1 changed files with 7 additions and 5 deletions
|
@ -381,11 +381,13 @@ character (`\`), or a single _escape_. It is equivalent to a `u8` unsigned
|
||||||
|
|
||||||
##### Byte string literals
|
##### Byte string literals
|
||||||
|
|
||||||
A _byte string literal_ is a sequence of ASCII characters and _escapes_
|
A non-raw _byte string literal_ is a sequence of ASCII characters and _escapes_,
|
||||||
enclosed within two `U+0022` (double-quote) characters, with the exception of
|
preceded by the characters `U+0062` (`b`) and `U+0022` (double-quote), and
|
||||||
`U+0022` itself, which must be _escaped_ by a preceding `U+005C` character
|
followed by the character `U+0022`. If the character `U+0022` is present within
|
||||||
(`\`), or a _raw byte string literal_. It is equivalent to a `&'static [u8]`
|
the literal, it must be _escaped_ by a preceding `U+005C` (`\`) character.
|
||||||
borrowed array of unsigned 8-bit integers.
|
Alternatively, a byte string literal can be a _raw byte string literal_, defined
|
||||||
|
below. A byte string literal is equivalent to a `&'static [u8]` borrowed array
|
||||||
|
of unsigned 8-bit integers.
|
||||||
|
|
||||||
Some additional _escapes_ are available in either byte or non-raw byte string
|
Some additional _escapes_ are available in either byte or non-raw byte string
|
||||||
literals. An escape starts with a `U+005C` (`\`) and continues with one of the
|
literals. An escape starts with a `U+005C` (`\`) and continues with one of the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue