Skip to content

Commit ece6c37

Browse files
committed
---
yaml --- r: 228314 b: refs/heads/try c: d22f189 h: refs/heads/master v: v3
1 parent cbc84a1 commit ece6c37

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 0bd5dd6449c9db734bd2d1700ea4b50e22b220be
4+
refs/heads/try: d22f189da13f8ffb3c9227a038615608e99a6211
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/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)