File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
branches/stable/src/libsyntax/parse/lexer Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32
- refs/heads/stable: 0bd5dd6449c9db734bd2d1700ea4b50e22b220be
32
+ refs/heads/stable: d22f189da13f8ffb3c9227a038615608e99a6211
33
33
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
34
34
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
35
35
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e
Original file line number Diff line number Diff line change @@ -742,7 +742,7 @@ impl<'a> StringReader<'a> {
742
742
let valid = self . scan_unicode_escape ( delim) ;
743
743
if valid && ascii_only {
744
744
self . err_span_ (
745
- escaped_pos ,
745
+ start ,
746
746
self . last_pos ,
747
747
"unicode escape sequences cannot be used as a byte or in \
748
748
a byte string"
@@ -753,9 +753,9 @@ impl<'a> StringReader<'a> {
753
753
}
754
754
}
755
755
'u' if !ascii_only => {
756
- self . err_span_ ( escaped_pos , self . last_pos ,
756
+ self . err_span_ ( start , self . last_pos ,
757
757
"incomplete unicode escape sequence" ) ;
758
- self . help_span_ ( escaped_pos , self . last_pos ,
758
+ self . help_span_ ( start , self . last_pos ,
759
759
"format of unicode escape sequences is `\\ u{…}`" ) ;
760
760
false
761
761
}
@@ -862,14 +862,12 @@ impl<'a> StringReader<'a> {
862
862
valid = false ;
863
863
}
864
864
865
- self . bump ( ) ; // past the ending }
866
-
867
865
if valid && ( char:: from_u32 ( accum_int) . is_none ( ) || count == 0 ) {
868
866
self . err_span_ ( start_bpos, self . last_pos , "illegal unicode character escape" ) ;
869
867
valid = false ;
870
868
}
871
869
872
-
870
+ self . bump ( ) ; // past the ending }
873
871
valid
874
872
}
875
873
You can’t perform that action at this time.
0 commit comments