Rename DiagnosticBuilder
as Diag
.
Much better! Note that this involves renaming (and updating the value of) `DIAGNOSTIC_BUILDER` in clippy.
This commit is contained in:
parent
b4b180c218
commit
7005ef9699
@ -1,6 +1,5 @@
|
|||||||
use rustc_errors::{
|
use rustc_errors::{
|
||||||
DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic,
|
DiagCtxt, DiagnosticArgValue, Diag, EmissionGuarantee, IntoDiagnostic, IntoDiagnosticArg, Level,
|
||||||
IntoDiagnosticArg, Level,
|
|
||||||
};
|
};
|
||||||
use rustc_macros::{Diagnostic, Subdiagnostic};
|
use rustc_macros::{Diagnostic, Subdiagnostic};
|
||||||
use rustc_span::Span;
|
use rustc_span::Span;
|
||||||
@ -112,12 +111,8 @@ pub(crate) struct TargetFeatureDisableOrEnable<'a> {
|
|||||||
pub(crate) struct MissingFeatures;
|
pub(crate) struct MissingFeatures;
|
||||||
|
|
||||||
impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> {
|
impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> {
|
||||||
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> {
|
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> {
|
||||||
let mut diag = DiagnosticBuilder::new(
|
let mut diag = Diag::new(dcx, level, fluent::codegen_gcc_target_feature_disable_or_enable);
|
||||||
dcx,
|
|
||||||
level,
|
|
||||||
fluent::codegen_gcc_target_feature_disable_or_enable
|
|
||||||
);
|
|
||||||
if let Some(span) = self.span {
|
if let Some(span) = self.span {
|
||||||
diag.span(span);
|
diag.span(span);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user