rustc_parse: Make Parser::unexpected
public and use it in built-in macros
This commit is contained in:
parent
299136b9c7
commit
219c66c55c
3 changed files with 4 additions and 5 deletions
|
@ -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`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue