1
Fork 0

rustc_parse: Make Parser::unexpected public and use it in built-in macros

This commit is contained in:
Vadim Petrochenkov 2020-10-06 00:21:03 +03:00
parent 299136b9c7
commit 219c66c55c
3 changed files with 4 additions and 5 deletions

View file

@ -386,7 +386,7 @@ impl<'a> Parser<'a> {
next
}
crate fn unexpected<T>(&mut self) -> PResult<'a, T> {
pub fn unexpected<T>(&mut self) -> PResult<'a, T> {
match self.expect_one_of(&[], &[]) {
Err(e) => Err(e),
// We can get `Ok(true)` from `recover_closing_delimiter`