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_session/src/parse.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_session/src/parse.rs')
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index b011ca4dd50..752bb05f3d7 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -15,8 +15,7 @@ use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet}; use rustc_data_structures::sync::{AppendOnlyVec, Lock, Lrc}; use rustc_errors::{emitter::SilentEmitter, DiagCtxt}; use rustc_errors::{ - fallback_fluent_bundle, DiagnosticBuilder, DiagnosticMessage, EmissionGuarantee, MultiSpan, - StashKey, + fallback_fluent_bundle, Diag, DiagnosticMessage, EmissionGuarantee, MultiSpan, StashKey, }; use rustc_feature::{find_feature_issue, GateIssue, UnstableFeatures}; use rustc_span::edition::Edition; @@ -86,7 +85,7 @@ pub fn feature_err( feature: Symbol, span: impl Into<MultiSpan>, explain: impl Into<DiagnosticMessage>, -) -> DiagnosticBuilder<'_> { +) -> Diag<'_> { feature_err_issue(sess, feature, span, GateIssue::Language, explain) } @@ -101,7 +100,7 @@ pub fn feature_err_issue( span: impl Into<MultiSpan>, issue: GateIssue, explain: impl Into<DiagnosticMessage>, -) -> DiagnosticBuilder<'_> { +) -> Diag<'_> { let span = span.into(); // Cancel an earlier warning for this same error, if it exists. @@ -158,7 +157,7 @@ pub fn feature_warn_issue( /// Adds the diagnostics for a feature to an existing error. pub fn add_feature_diagnostics<G: EmissionGuarantee>( - err: &mut DiagnosticBuilder<'_, G>, + err: &mut Diag<'_, G>, sess: &Session, feature: Symbol, ) { @@ -171,7 +170,7 @@ pub fn add_feature_diagnostics<G: EmissionGuarantee>( /// Almost always, you want to use this for a language feature. If so, prefer /// `add_feature_diagnostics`. pub fn add_feature_diagnostics_for_issue<G: EmissionGuarantee>( - err: &mut DiagnosticBuilder<'_, G>, + err: &mut Diag<'_, G>, sess: &Session, feature: Symbol, issue: GateIssue, |
