File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ nonzero_dec: '1' | '2' | '3' | '4'
302
302
303
303
A _ character literal_ is a single Unicode character enclosed within two
304
304
` U+0027 ` (single-quote) characters, with the exception of ` U+0027 ` itself,
305
- which must be _ escaped_ by a preceding U+005C character (` \ ` ).
305
+ which must be _ escaped_ by a preceding ` U+005C ` character (` \ ` ).
306
306
307
307
##### String literals
308
308
@@ -311,6 +311,19 @@ A _string literal_ is a sequence of any Unicode characters enclosed within two
311
311
which must be _ escaped_ by a preceding ` U+005C ` character (` \ ` ), or a _ raw
312
312
string literal_ .
313
313
314
+ A multi-line string literal may be defined by terminating each line with a
315
+ ` U+005C ` character (` \ ` ) immediately before the newline. This causes the
316
+ ` U+005C ` character, the newline, and all whitespace at the beginning of the
317
+ next line to be ignored.
318
+
319
+ ``` rust
320
+ let a = " foobar" ;
321
+ let b = " foo\
322
+ bar" ;
323
+ ```
324
+
325
+ ` a ` is equivalent to ` b ` .
326
+
314
327
##### Character escapes
315
328
316
329
Some additional _ escapes_ are available in either character or non-raw string
You can’t perform that action at this time.
0 commit comments