Importing rustc-1.68.0
Test: ./build.py --lto=thin
Change-Id: I81611ac72af04f6524423f6b8f0e3d9f40234686
diff --git a/compiler/rustc_monomorphize/src/errors.rs b/compiler/rustc_monomorphize/src/errors.rs
index f1ca72d..5233cfb 100644
--- a/compiler/rustc_monomorphize/src/errors.rs
+++ b/compiler/rustc_monomorphize/src/errors.rs
@@ -32,13 +32,13 @@
pub type_length: usize,
}
-pub struct UnusedGenericParams {
+pub struct UnusedGenericParamsHint {
pub span: Span,
pub param_spans: Vec<Span>,
pub param_names: Vec<String>,
}
-impl IntoDiagnostic<'_> for UnusedGenericParams {
+impl IntoDiagnostic<'_> for UnusedGenericParamsHint {
#[track_caller]
fn into_diagnostic(
self,
@@ -50,7 +50,7 @@
// 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. 😢
- diag.span_label(span, format!("generic parameter `{}` is unused", name));
+ diag.span_label(span, format!("generic parameter `{name}` is unused"));
}
diag
}
@@ -77,3 +77,9 @@
pub span: Option<Span>,
pub symbol: String,
}
+
+#[derive(Diagnostic)]
+#[diag(monomorphize_couldnt_dump_mono_stats)]
+pub struct CouldntDumpMonoStats {
+ pub error: String,
+}