Skip to content

Commit 18a643c

Browse files
committed
---
yaml --- r: 36365 b: refs/heads/try2 c: a41903d h: refs/heads/master i: 36363: 55fc780 v: v3
1 parent 6966427 commit 18a643c

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 5e4ed709cba6bf0d6df3b50b86c12cd59cf4f842
8+
refs/heads/try2: a41903d234e21bf1a4616f6f5da83a0122c41092
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/src/libsyntax/parse/lexer.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ fn bump(rdr: string_reader) {
145145
rdr.last_pos = rdr.pos;
146146
let current_byte_offset = byte_offset(rdr).to_uint();;
147147
if current_byte_offset < (*rdr.src).len() {
148+
assert rdr.curr != -1 as char;
148149
let last_char = rdr.curr;
149150
let next = str::char_range_at(*rdr.src, current_byte_offset);
150151
let byte_offset_diff = next.next - current_byte_offset;
@@ -161,12 +162,7 @@ fn bump(rdr: string_reader) {
161162
BytePos(current_byte_offset), byte_offset_diff);
162163
}
163164
} else {
164-
// XXX: What does this accomplish?
165-
if (rdr.curr != -1 as char) {
166-
rdr.pos = rdr.pos + BytePos(1u);
167-
rdr.col += CharPos(1u);
168-
rdr.curr = -1 as char;
169-
}
165+
rdr.curr = -1 as char;
170166
}
171167
}
172168
fn is_eof(rdr: string_reader) -> bool {

0 commit comments

Comments
 (0)