diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-23 10:20:45 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-28 08:55:35 +1100 |
| commit | 4026fd735c31f02fa8c2cd326459fb9851e354c9 (patch) | |
| tree | c3db376a41a0c407cfbb4a3fc2f95a85a1336478 | |
| parent | d84567c0ffab10a14f6b6ff11b8ee7235a5e25ac (diff) | |
| download | rust-4026fd735c31f02fa8c2cd326459fb9851e354c9.tar.gz rust-4026fd735c31f02fa8c2cd326459fb9851e354c9.zip | |
Rename `DiagnosticBuilder` as `Diag`.
Much better! Note that this involves renaming (and updating the value of) `DIAGNOSTIC_BUILDER` in clippy.
| -rw-r--r-- | src/parse/parser.rs | 4 | ||||
| -rw-r--r-- | src/parse/session.rs | 4 |
2 files changed, 4 insertions, 4 deletions
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 std::path::{Path, PathBuf}; 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 @@ impl<'a> ParserBuilder<'a> { fn parser( sess: &'a rustc_session::parse::ParseSess, input: Input, - ) -> Result<rustc_parse::parser::Parser<'a>, Option<Vec<DiagnosticBuilder<'a>>>> { + ) -> Result<rustc_parse::parser::Parser<'a>, Option<Vec<Diag<'a>>>> { 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_data_structures::sync::{IntoDynSyncSend, Lrc}; 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 @@ impl ParseSess { // Methods that should be restricted within the parse module. impl ParseSess { - pub(super) fn emit_diagnostics(&self, diagnostics: Vec<DiagnosticBuilder<'_>>) { + pub(super) fn emit_diagnostics(&self, diagnostics: Vec<Diag<'_>>) { for diagnostic in diagnostics { diagnostic.emit(); } |
