Skip to content

Commit

Permalink
Rollup merge of rust-lang#51240 - nnethercote:parse-2, r=nikomatsakis
Browse files Browse the repository at this point in the history
Two minor parsing tweaks
  • Loading branch information
GuillaumeGomez authored May 31, 2018
2 parents 33ad846 + 5adba8e commit 7552c2e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/libsyntax/parse/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ impl<'a> StringReader<'a> {
return None;
}
let start = self.pos;
self.bump();
while ident_continue(self.ch) {
self.bump();
}
Expand Down Expand Up @@ -1155,6 +1156,7 @@ impl<'a> StringReader<'a> {
}

let start = self.pos;
self.bump();
while ident_continue(self.ch) {
self.bump();
}
Expand Down Expand Up @@ -1300,11 +1302,7 @@ impl<'a> StringReader<'a> {
}
'-' => {
self.bump();
match self.ch.unwrap_or('\x00') {
_ => {
Ok(token::LArrow)
}
}
Ok(token::LArrow)
}
_ => {
Ok(token::Lt)
Expand Down

0 comments on commit 7552c2e

Please sign in to comment.