diff options
| author | bors <bors@rust-lang.org> | 2023-12-24 05:19:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-24 05:19:43 +0000 |
| commit | 1754946b3ed693834bb79760169e528277fd98d2 (patch) | |
| tree | b3d97623b0f43b549734a6730ef55f0adf29dbea /compiler/rustc_codegen_gcc/src/errors.rs | |
| parent | 2c7e0fd373ae8f7d8c5aee1c0ec8e3249e3f3649 (diff) | |
| parent | 29f25ee3f381922b39a67089bb07d70bfbe2f17e (diff) | |
| download | rust-1754946b3ed693834bb79760169e528277fd98d2.tar.gz rust-1754946b3ed693834bb79760169e528277fd98d2.zip | |
Auto merge of #3238 - rust-lang:rustup-2023-12-24, r=saethlin
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/errors.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/errors.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_gcc/src/errors.rs b/compiler/rustc_codegen_gcc/src/errors.rs index 766d90cf724..1b1ed0b411c 100644 --- a/compiler/rustc_codegen_gcc/src/errors.rs +++ b/compiler/rustc_codegen_gcc/src/errors.rs @@ -1,6 +1,6 @@ use rustc_errors::{ - DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, ErrorGuaranteed, IntoDiagnostic, - IntoDiagnosticArg, + DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, + IntoDiagnosticArg, Level, }; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::Span; @@ -111,9 +111,13 @@ pub(crate) struct TargetFeatureDisableOrEnable<'a> { #[help(codegen_gcc_missing_features)] pub(crate) struct MissingFeatures; -impl IntoDiagnostic<'_, ErrorGuaranteed> for TargetFeatureDisableOrEnable<'_> { - fn into_diagnostic(self, dcx: &'_ DiagCtxt) -> DiagnosticBuilder<'_, ErrorGuaranteed> { - let mut diag = dcx.struct_err(fluent::codegen_gcc_target_feature_disable_or_enable); +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 + ); if let Some(span) = self.span { diag.set_span(span); }; |
