diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 3269fe7c7c7..19b0dada08f 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -3,7 +3,7 @@ use rustc_ast::token::TokenKind; use rustc_ast::{ast, attr, ptr}; -use rustc_errors::DiagnosticBuilder; +use rustc_errors::Diag; use rustc_parse::{new_parser_from_file, parser::Parser as RawParser}; use rustc_span::{sym, Span}; use thin_vec::ThinVec; @@ -65,7 +65,7 @@ pub(crate) fn build(self) -> Result, ParserError> { fn parser( sess: &'a rustc_session::parse::ParseSess, input: Input, - ) -> Result, Option>>> { + ) -> Result, Option>>> { match input { Input::File(ref file) => catch_unwind(AssertUnwindSafe(move || { new_parser_from_file(sess, file, None) diff --git a/src/parse/session.rs b/src/parse/session.rs index 272cc86f783..e33f1ca755c 100644 --- a/src/parse/session.rs +++ b/src/parse/session.rs @@ -6,7 +6,7 @@ use rustc_errors::emitter::{DynEmitter, Emitter, HumanEmitter}; use rustc_errors::translation::Translate; use rustc_errors::{ - ColorConfig, DiagCtxt, DiagInner, DiagnosticBuilder, ErrorGuaranteed, Level as DiagnosticLevel, + ColorConfig, Diag, DiagCtxt, DiagInner, ErrorGuaranteed, Level as DiagnosticLevel, }; use rustc_session::parse::ParseSess as RawParseSess; use rustc_span::{ @@ -300,7 +300,7 @@ pub(crate) fn get_original_snippet(&self, file_name: &FileName) -> Option>) { + pub(super) fn emit_diagnostics(&self, diagnostics: Vec>) { for diagnostic in diagnostics { diagnostic.emit(); }