diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-10-06 00:21:03 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-10-06 00:23:36 +0300 |
| commit | 219c66c55c86db51a1a278c2d3cb7f8a1f4426e9 (patch) | |
| tree | fda577d295d9e2e021f6835d5fd3118ff9297f77 /compiler/rustc_parse/src/parser | |
| parent | 299136b9c71596830dd31919df0c3f50628bab71 (diff) | |
| download | rust-219c66c55c86db51a1a278c2d3cb7f8a1f4426e9.tar.gz rust-219c66c55c86db51a1a278c2d3cb7f8a1f4426e9.zip | |
rustc_parse: Make `Parser::unexpected` public and use it in built-in macros
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 7340c574480..070fc140ec4 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -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` |
