From 4f9fe856a25ab29345b90e7725509e9ee38a37be Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:41 +0200 Subject: Adding upstream version 1.69.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_monomorphize/src/errors.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_monomorphize/src/errors.rs') diff --git a/compiler/rustc_monomorphize/src/errors.rs b/compiler/rustc_monomorphize/src/errors.rs index 5233cfb21..495a73490 100644 --- a/compiler/rustc_monomorphize/src/errors.rs +++ b/compiler/rustc_monomorphize/src/errors.rs @@ -1,5 +1,6 @@ use std::path::PathBuf; +use crate::fluent_generated as fluent; use rustc_errors::ErrorGuaranteed; use rustc_errors::IntoDiagnostic; use rustc_macros::{Diagnostic, LintDiagnostic}; @@ -44,7 +45,7 @@ impl IntoDiagnostic<'_> for UnusedGenericParamsHint { self, handler: &'_ rustc_errors::Handler, ) -> rustc_errors::DiagnosticBuilder<'_, ErrorGuaranteed> { - let mut diag = handler.struct_err(rustc_errors::fluent::monomorphize_unused_generic_params); + let mut diag = handler.struct_err(fluent::monomorphize_unused_generic_params); diag.set_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, @@ -83,3 +84,17 @@ pub struct SymbolAlreadyDefined { pub struct CouldntDumpMonoStats { pub error: String, } + +#[derive(Diagnostic)] +#[diag(monomorphize_encountered_error_while_instantiating)] +pub struct EncounteredErrorWhileInstantiating { + #[primary_span] + pub span: Span, + pub formatted_item: String, +} + +#[derive(Diagnostic)] +#[diag(monomorphize_unknown_cgu_collection_mode)] +pub struct UnknownCguCollectionMode<'a> { + pub mode: &'a str, +} -- cgit v1.2.3