diff options
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 6d534bece46..d8e6d5037bb 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -32,7 +32,7 @@ use rustc_ast_pretty::pprust; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::sync::Lrc; use rustc_errors::PResult; -use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder, FatalError}; +use rustc_errors::{struct_span_err, Applicability, DiagnosticBuilder, ErrorReported, FatalError}; use rustc_session::parse::ParseSess; use rustc_span::source_map::{MultiSpan, Span, DUMMY_SP}; use rustc_span::symbol::{kw, sym, Ident, Symbol}; @@ -849,7 +849,7 @@ impl<'a> Parser<'a> { v.push(t); continue; } - Err(mut e) => { + Err(e) => { // Parsing failed, therefore it must be something more serious // than just a missing separator. expect_err.emit(); @@ -877,7 +877,7 @@ impl<'a> Parser<'a> { fn recover_missing_braces_around_closure_body( &mut self, closure_spans: ClosureSpans, - mut expect_err: DiagnosticBuilder<'_>, + mut expect_err: DiagnosticBuilder<'_, ErrorReported>, ) -> PResult<'a, ()> { let initial_semicolon = self.token.span; @@ -1429,7 +1429,7 @@ impl<'a> Parser<'a> { crate fn make_unclosed_delims_error( unmatched: UnmatchedBrace, sess: &ParseSess, -) -> Option<DiagnosticBuilder<'_>> { +) -> Option<DiagnosticBuilder<'_, ErrorReported>> { // `None` here means an `Eof` was found. We already emit those errors elsewhere, we add them to // `unmatched_braces` only for error recovery in the `Parser`. let found_delim = unmatched.found_delim?; |
