diff options
| author | bors <bors@rust-lang.org> | 2024-02-28 20:39:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-28 20:39:38 +0000 |
| commit | c475e2303b551d726307c646181e0677af1e0069 (patch) | |
| tree | 1adcfeb24550451e018fe8928319a9fa68d53314 /compiler/rustc_codegen_gcc/src | |
| parent | bf9c7a64ad222b85397573668b39e6d1ab9f4a72 (diff) | |
| parent | 8f3b007abca70140d354f19ece5745d1a2c5f2b2 (diff) | |
| download | rust-c475e2303b551d726307c646181e0677af1e0069.tar.gz rust-c475e2303b551d726307c646181e0677af1e0069.zip | |
Auto merge of #121489 - nnethercote:diag-renaming, r=davidtwco
Diagnostic renaming Renaming various diagnostic types from `Diagnostic*` to `Diag*`. Part of https://github.com/rust-lang/compiler-team/issues/722. There are more to do but this is enough for one PR. r? `@davidtwco`
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/errors.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_gcc/src/errors.rs b/compiler/rustc_codegen_gcc/src/errors.rs index 79eb4406b8a..988a7e1033e 100644 --- a/compiler/rustc_codegen_gcc/src/errors.rs +++ b/compiler/rustc_codegen_gcc/src/errors.rs @@ -1,6 +1,5 @@ use rustc_errors::{ - DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, - IntoDiagnosticArg, Level, + DiagCtxt, DiagArgValue, Diag, EmissionGuarantee, IntoDiagnostic, IntoDiagnosticArg, Level, }; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::Span; @@ -35,11 +34,11 @@ pub(crate) enum PossibleFeature<'a> { struct ExitCode(Option<i32>); impl IntoDiagnosticArg for ExitCode { - fn into_diagnostic_arg(self) -> DiagnosticArgValue { + fn into_diagnostic_arg(self) -> DiagArgValue { let ExitCode(exit_code) = self; match exit_code { Some(t) => t.into_diagnostic_arg(), - None => DiagnosticArgValue::Str(Cow::Borrowed("<signal>")), + None => DiagArgValue::Str(Cow::Borrowed("<signal>")), } } } @@ -112,12 +111,8 @@ pub(crate) struct TargetFeatureDisableOrEnable<'a> { pub(crate) struct MissingFeatures; impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> { - fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> { - let mut diag = DiagnosticBuilder::new( - dcx, - level, - fluent::codegen_gcc_target_feature_disable_or_enable - ); + fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> { + let mut diag = Diag::new(dcx, level, fluent::codegen_gcc_target_feature_disable_or_enable); if let Some(span) = self.span { diag.span(span); }; |
