Skip to content

Commit 7552c2e

Browse files
Rollup merge of #51240 - nnethercote:parse-2, r=nikomatsakis
Two minor parsing tweaks
2 parents 33ad846 + 5adba8e commit 7552c2e

File tree

1 file changed

+3
-5
lines changed
  • src/libsyntax/parse/lexer

1 file changed

+3
-5
lines changed

src/libsyntax/parse/lexer/mod.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ impl<'a> StringReader<'a> {
516516
return None;
517517
}
518518
let start = self.pos;
519+
self.bump();
519520
while ident_continue(self.ch) {
520521
self.bump();
521522
}
@@ -1155,6 +1156,7 @@ impl<'a> StringReader<'a> {
11551156
}
11561157

11571158
let start = self.pos;
1159+
self.bump();
11581160
while ident_continue(self.ch) {
11591161
self.bump();
11601162
}
@@ -1300,11 +1302,7 @@ impl<'a> StringReader<'a> {
13001302
}
13011303
'-' => {
13021304
self.bump();
1303-
match self.ch.unwrap_or('\x00') {
1304-
_ => {
1305-
Ok(token::LArrow)
1306-
}
1307-
}
1305+
Ok(token::LArrow)
13081306
}
13091307
_ => {
13101308
Ok(token::Lt)

0 commit comments

Comments
 (0)