Skip to content

Commit aa43eec

Browse files
committed
Auto merge of #22072 - geofft:doc-byte-string-literal, r=kmcallister
This was correct in the EBNF, but not in the prose (which seems to have been copied-and-pasted from regular string literals).
2 parents 0ba9e1f + bb49195 commit aa43eec

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/doc/reference.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,13 @@ character (`\`), or a single _escape_. It is equivalent to a `u8` unsigned
381381

382382
##### Byte string literals
383383

384-
A _byte string literal_ is a sequence of ASCII characters and _escapes_
385-
enclosed within two `U+0022` (double-quote) characters, with the exception of
386-
`U+0022` itself, which must be _escaped_ by a preceding `U+005C` character
387-
(`\`), or a _raw byte string literal_. It is equivalent to a `&'static [u8]`
388-
borrowed array of unsigned 8-bit integers.
384+
A non-raw _byte string literal_ is a sequence of ASCII characters and _escapes_,
385+
preceded by the characters `U+0062` (`b`) and `U+0022` (double-quote), and
386+
followed by the character `U+0022`. If the character `U+0022` is present within
387+
the literal, it must be _escaped_ by a preceding `U+005C` (`\`) character.
388+
Alternatively, a byte string literal can be a _raw byte string literal_, defined
389+
below. A byte string literal is equivalent to a `&'static [u8]` borrowed array
390+
of unsigned 8-bit integers.
389391

390392
Some additional _escapes_ are available in either byte or non-raw byte string
391393
literals. An escape starts with a `U+005C` (`\`) and continues with one of the

0 commit comments

Comments
 (0)