about summary refs log tree commit diff
path: root/src/doc/reference.md
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-10 08:41:52 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-10 08:41:52 -0800
commit577c51cdc03c7ef95f15e36cf1130080082bce5a (patch)
treea3e974e0bc8a72501427e2b40ce44e8a877a341a /src/doc/reference.md
parentcef623e5a6a57ddf9a126664f3cbb76735955cfd (diff)
parentbb49195d22105e11feffc604a2c25128617816b6 (diff)
downloadrust-577c51cdc03c7ef95f15e36cf1130080082bce5a.tar.gz
rust-577c51cdc03c7ef95f15e36cf1130080082bce5a.zip
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).
Diffstat (limited to 'src/doc/reference.md')
-rw-r--r--src/doc/reference.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index e5ad4f8200b..09181e10abd 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -381,11 +381,13 @@ character (`\`), or a single _escape_. It is equivalent to a `u8` unsigned
 
 ##### Byte string literals
 
-A _byte string literal_ is a sequence of ASCII characters and _escapes_
-enclosed within two `U+0022` (double-quote) characters, with the exception of
-`U+0022` itself, which must be _escaped_ by a preceding `U+005C` character
-(`\`), or a _raw byte string literal_. It is equivalent to a `&'static [u8]`
-borrowed array of unsigned 8-bit integers.
+A non-raw _byte string literal_ is a sequence of ASCII characters and _escapes_,
+preceded by the characters `U+0062` (`b`) and `U+0022` (double-quote), and
+followed by the character `U+0022`. If the character `U+0022` is present within
+the literal, it must be _escaped_ by a preceding `U+005C` (`\`) character.
+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
 literals. An escape starts with a `U+005C` (`\`) and continues with one of the