File tree 1 file changed +13
-13
lines changed
src/libsyntax/parse/lexer
1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -729,18 +729,18 @@ impl<'a> StringReader<'a> {
729
729
'n' | 'r' | 't' | '\\' | '\'' | '"' | '0' => true ,
730
730
'x' => self . scan_byte_escape ( delim, !ascii_only) ,
731
731
'u' if self . curr_is ( '{' ) => {
732
- let valid = self . scan_unicode_escape ( delim) ;
733
- if valid && ascii_only {
734
- self . err_span_ (
735
- escaped_pos,
736
- self . last_pos ,
737
- "unicode escape sequences cannot be used as a byte or in \
738
- a byte string"
739
- ) ;
740
- false
741
- } else {
742
- valid
743
- }
732
+ let valid = self . scan_unicode_escape ( delim) ;
733
+ if valid && ascii_only {
734
+ self . err_span_ (
735
+ escaped_pos,
736
+ self . last_pos ,
737
+ "unicode escape sequences cannot be used as a byte or in \
738
+ a byte string"
739
+ ) ;
740
+ false
741
+ } else {
742
+ valid
743
+ }
744
744
}
745
745
'\n' if delim == '"' => {
746
746
self . consume_whitespace ( ) ;
@@ -852,7 +852,7 @@ impl<'a> StringReader<'a> {
852
852
853
853
if valid && ( char:: from_u32 ( accum_int) . is_none ( ) || count == 0 ) {
854
854
self . err_span_ ( start_bpos, self . last_pos , "illegal unicode character escape" ) ;
855
- valid= false ;
855
+ valid = false ;
856
856
}
857
857
858
858
You can’t perform that action at this time.
0 commit comments