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 | 899cb40809a85eb9d89f6da3268713b83175360a (patch) | |
| tree | e4c9a526f3eeb5d8563bfe254f1507648fddede2 /compiler/rustc_parse/src/parser/mod.rs | |
| parent | 4e1f9bd528aef7215bb3b446fcdf43368371da37 (diff) | |
| download | rust-899cb40809a85eb9d89f6da3268713b83175360a.tar.gz rust-899cb40809a85eb9d89f6da3268713b83175360a.zip | |
Rename `DiagnosticBuilder` as `Diag`.
Much better! Note that this involves renaming (and updating the value of) `DIAGNOSTIC_BUILDER` in clippy.
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 29dd2eeb56a..8542ea62310 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -33,7 +33,7 @@ use rustc_ast::{HasAttrs, HasTokens, Unsafe, Visibility, VisibilityKind}; use rustc_ast_pretty::pprust; use rustc_data_structures::fx::FxHashMap; use rustc_errors::PResult; -use rustc_errors::{Applicability, DiagnosticBuilder, FatalError, MultiSpan}; +use rustc_errors::{Applicability, Diag, FatalError, MultiSpan}; use rustc_session::parse::ParseSess; use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::{Span, DUMMY_SP}; @@ -934,7 +934,7 @@ impl<'a> Parser<'a> { fn recover_missing_braces_around_closure_body( &mut self, closure_spans: ClosureSpans, - mut expect_err: DiagnosticBuilder<'_>, + mut expect_err: Diag<'_>, ) -> PResult<'a, ()> { let initial_semicolon = self.token.span; @@ -1522,7 +1522,7 @@ impl<'a> Parser<'a> { pub(crate) fn make_unclosed_delims_error( unmatched: UnmatchedDelim, sess: &ParseSess, -) -> Option<DiagnosticBuilder<'_>> { +) -> Option<Diag<'_>> { // `None` here means an `Eof` was found. We already emit those errors elsewhere, we add them to // `unmatched_delims` only for error recovery in the `Parser`. let found_delim = unmatched.found_delim?; |
