Skip to content

Commit c726c70

Browse files
committed
---
yaml --- r: 235385 b: refs/heads/stable c: d22f189 h: refs/heads/master i: 235383: a46a3f6 v: v3
1 parent b2cf2bd commit c726c70

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 0bd5dd6449c9db734bd2d1700ea4b50e22b220be
32+
refs/heads/stable: d22f189da13f8ffb3c9227a038615608e99a6211
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/libsyntax/parse/lexer/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ impl<'a> StringReader<'a> {
742742
let valid = self.scan_unicode_escape(delim);
743743
if valid && ascii_only {
744744
self.err_span_(
745-
escaped_pos,
745+
start,
746746
self.last_pos,
747747
"unicode escape sequences cannot be used as a byte or in \
748748
a byte string"
@@ -753,9 +753,9 @@ impl<'a> StringReader<'a> {
753753
}
754754
}
755755
'u' if !ascii_only => {
756-
self.err_span_(escaped_pos, self.last_pos,
756+
self.err_span_(start, self.last_pos,
757757
"incomplete unicode escape sequence");
758-
self.help_span_(escaped_pos, self.last_pos,
758+
self.help_span_(start, self.last_pos,
759759
"format of unicode escape sequences is `\\u{…}`");
760760
false
761761
}
@@ -862,14 +862,12 @@ impl<'a> StringReader<'a> {
862862
valid = false;
863863
}
864864

865-
self.bump(); // past the ending }
866-
867865
if valid && (char::from_u32(accum_int).is_none() || count == 0) {
868866
self.err_span_(start_bpos, self.last_pos, "illegal unicode character escape");
869867
valid = false;
870868
}
871869

872-
870+
self.bump(); // past the ending }
873871
valid
874872
}
875873

0 commit comments

Comments
 (0)