diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-11-12 22:12:33 +0100 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-11-15 19:34:35 +0100 |
| commit | b7b67228f9cd4fab4462ebe4d4d05ad10bf5a7d7 (patch) | |
| tree | 11b3b6e74f943da09e0badaf729022b8cd6a3485 /compiler/rustc_parse | |
| parent | 6d651a295e0e0c331153288b10b78344a4ede20b (diff) | |
| download | rust-b7b67228f9cd4fab4462ebe4d4d05ad10bf5a7d7.tar.gz rust-b7b67228f9cd4fab4462ebe4d4d05ad10bf5a7d7.zip | |
Only do parser recovery on retried macro matching
This prevents issues with eager parser recovery during macro matching.
Diffstat (limited to 'compiler/rustc_parse')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 14dc490fb02..13a38a17735 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -503,8 +503,8 @@ impl<'a> Parser<'a> { parser } - pub fn forbid_recovery(mut self) -> Self { - self.recovery = Recovery::Forbidden; + pub fn recovery(mut self, recovery: Recovery) -> Self { + self.recovery = recovery; self } |
