diff options
Diffstat (limited to 'compiler/rustc_monomorphize/src/errors.rs')
| -rw-r--r-- | compiler/rustc_monomorphize/src/errors.rs | 25 | 
1 files changed, 0 insertions, 25 deletions
| diff --git a/compiler/rustc_monomorphize/src/errors.rs b/compiler/rustc_monomorphize/src/errors.rs index 02865cad302..fc8d63b5888 100644 --- a/compiler/rustc_monomorphize/src/errors.rs +++ b/compiler/rustc_monomorphize/src/errors.rs @@ -1,11 +1,8 @@ use std::path::PathBuf; -use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level}; use rustc_macros::{Diagnostic, LintDiagnostic}; use rustc_span::{Span, Symbol}; -use crate::fluent_generated as fluent; - #[derive(Diagnostic)] #[diag(monomorphize_recursion_limit)] pub(crate) struct RecursionLimit { @@ -28,28 +25,6 @@ pub(crate) struct NoOptimizedMir { pub crate_name: Symbol, } -pub(crate) struct UnusedGenericParamsHint { - pub span: Span, - pub param_spans: Vec<Span>, - pub param_names: Vec<String>, -} - -impl<G: EmissionGuarantee> Diagnostic<'_, G> for UnusedGenericParamsHint { - #[track_caller] - fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> { - let mut diag = Diag::new(dcx, level, fluent::monomorphize_unused_generic_params); - diag.span(self.span); - for (span, name) in self.param_spans.into_iter().zip(self.param_names) { - // FIXME: I can figure out how to do a label with a fluent string with a fixed message, - // or a label with a dynamic value in a hard-coded string, but I haven't figured out - // how to combine the two. 😢 - #[allow(rustc::untranslatable_diagnostic)] - diag.span_label(span, format!("generic parameter `{name}` is unused")); - } - diag - } -} - #[derive(LintDiagnostic)] #[diag(monomorphize_large_assignments)] #[note] | 
