Rollup merge of #36669 - jseyfried:refactor_tok_result, r=nrc
Unify `TokResult` and `ResultAnyMacro` Fixes #36641. r? @nrc
This commit is contained in:
@@ -6141,15 +6141,4 @@ impl<'a> Parser<'a> {
|
||||
_ => Err(self.fatal("expected string literal"))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn ensure_complete_parse<F>(&mut self, allow_semi: bool, on_err: F)
|
||||
where F: FnOnce(&Parser)
|
||||
{
|
||||
if allow_semi && self.token == token::Semi {
|
||||
self.bump();
|
||||
}
|
||||
if self.token != token::Eof {
|
||||
on_err(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user