Skip to content

Commit 7005ef9

Browse files
committed
Rename DiagnosticBuilder as Diag.
Much better! Note that this involves renaming (and updating the value of) `DIAGNOSTIC_BUILDER` in clippy.
1 parent b4b180c commit 7005ef9

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/errors.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use rustc_errors::{
2-
DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic,
3-
IntoDiagnosticArg, Level,
2+
DiagCtxt, DiagnosticArgValue, Diag, EmissionGuarantee, IntoDiagnostic, IntoDiagnosticArg, Level,
43
};
54
use rustc_macros::{Diagnostic, Subdiagnostic};
65
use rustc_span::Span;
@@ -112,12 +111,8 @@ pub(crate) struct TargetFeatureDisableOrEnable<'a> {
112111
pub(crate) struct MissingFeatures;
113112

114113
impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> {
115-
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> {
116-
let mut diag = DiagnosticBuilder::new(
117-
dcx,
118-
level,
119-
fluent::codegen_gcc_target_feature_disable_or_enable
120-
);
114+
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> {
115+
let mut diag = Diag::new(dcx, level, fluent::codegen_gcc_target_feature_disable_or_enable);
121116
if let Some(span) = self.span {
122117
diag.span(span);
123118
};

0 commit comments

Comments
 (0)