Always emit mismatched delim errors, never panic
This commit is contained in:
parent
ac6cc2d6b0
commit
f156d92207
1 changed files with 2 additions and 3 deletions
|
@ -262,7 +262,8 @@ pub struct Parser<'a> {
|
|||
impl<'a> Drop for Parser<'a> {
|
||||
fn drop(&mut self) {
|
||||
if !self.unclosed_delims.is_empty() {
|
||||
panic!("unclosed delimiter errors not emitted");
|
||||
let diag = self.diagnostic();
|
||||
emit_unclosed_delims(&mut self.unclosed_delims, diag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8567,8 +8568,6 @@ impl<'a> Parser<'a> {
|
|||
module: self.parse_mod_items(&token::Eof, lo)?,
|
||||
span: lo.to(self.span),
|
||||
});
|
||||
let diag = self.diagnostic();
|
||||
emit_unclosed_delims(&mut self.unclosed_delims, diag);
|
||||
krate
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue