File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -153,16 +153,21 @@ which must be _escaped_ by a preceding `U+005C` character (`\`).
153153Line-breaks are allowed in string literals. A line-break is either a newline
154154(` U+000A ` ) or a pair of carriage return and newline (` U+000D ` , ` U+000A ` ). Both
155155byte sequences are normally translated to ` U+000A ` , but as a special exception,
156- when an unescaped ` U+005C ` character (` \ ` ) occurs immediately before the
157- line-break, then the ` U+005C ` character, the line-break, and all whitespace at the
158- beginning of the next line are ignored. Thus ` a ` and ` b ` are equal:
156+ when an unescaped ` U+005C ` character (` \ ` ) occurs immediately before a line
157+ break, then the line break character(s), and all immediately following
158+ ` ` (` U+0020 ` ), ` \t ` (` U+0009 ` ), ` \n ` (` U+000A ` ) and ` \r ` (` U+0000D ` ) characters
159+ are ignored. Thus ` a ` , ` b ` and ` c ` are equal:
159160
160161``` rust
161162let a = " foobar" ;
162163let b = " foo\
163164 bar" ;
165+ let c = " foo\
164166
165- assert_eq! (a ,b );
167+ bar" ;
168+
169+ assert_eq! (a , b );
170+ assert_eq! (b , c );
166171```
167172
168173#### Character escapes
You can’t perform that action at this time.
0 commit comments