Rollup merge of #51240 - nnethercote:parse-2, r=nikomatsakis

Two minor parsing tweaks
This commit is contained in:
Guillaume Gomez
2018-05-31 22:17:16 +02:00
committed by GitHub
+3 -5
View File
@@ -516,6 +516,7 @@ fn scan_optional_raw_name(&mut self) -> Option<ast::Name> {
return None;
}
let start = self.pos;
self.bump();
while ident_continue(self.ch) {
self.bump();
}
@@ -1155,6 +1156,7 @@ fn next_token_inner(&mut self) -> Result<token::Token, ()> {
}
let start = self.pos;
self.bump();
while ident_continue(self.ch) {
self.bump();
}
@@ -1300,11 +1302,7 @@ fn next_token_inner(&mut self) -> Result<token::Token, ()> {
}
'-' => {
self.bump();
match self.ch.unwrap_or('\x00') {
_ => {
Ok(token::LArrow)
}
}
Ok(token::LArrow)
}
_ => {
Ok(token::Lt)