summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_metadata/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_metadata/src/errors.rs')
-rw-r--r--compiler/rustc_metadata/src/errors.rs30
1 files changed, 10 insertions, 20 deletions
diff --git a/compiler/rustc_metadata/src/errors.rs b/compiler/rustc_metadata/src/errors.rs
index 6f7e6e09c..02c03114e 100644
--- a/compiler/rustc_metadata/src/errors.rs
+++ b/compiler/rustc_metadata/src/errors.rs
@@ -25,6 +25,14 @@ pub struct LibRequired<'a> {
}
#[derive(Diagnostic)]
+#[diag(metadata_rustc_lib_required)]
+#[help]
+pub struct RustcLibRequired<'a> {
+ pub crate_name: Symbol,
+ pub kind: &'a str,
+}
+
+#[derive(Diagnostic)]
#[diag(metadata_crate_dep_multiple)]
#[help]
pub struct CrateDepMultiple {
@@ -372,14 +380,6 @@ pub struct ConflictingAllocErrorHandler {
pub struct GlobalAllocRequired;
#[derive(Diagnostic)]
-#[diag(metadata_alloc_func_required)]
-pub struct AllocFuncRequired;
-
-#[derive(Diagnostic)]
-#[diag(metadata_missing_alloc_error_handler)]
-pub struct MissingAllocErrorHandler;
-
-#[derive(Diagnostic)]
#[diag(metadata_no_transitive_needs_dep)]
pub struct NoTransitiveNeedsDep<'a> {
pub crate_name: Symbol,
@@ -494,26 +494,16 @@ impl IntoDiagnostic<'_> for MultipleCandidates {
let mut diag = handler.struct_err(rustc_errors::fluent::metadata_multiple_candidates);
diag.set_arg("crate_name", self.crate_name);
diag.set_arg("flavor", self.flavor);
- diag.code(error_code!(E0465));
+ diag.code(error_code!(E0464));
diag.set_span(self.span);
for (i, candidate) in self.candidates.iter().enumerate() {
- diag.span_note(self.span, &format!("candidate #{}: {}", i + 1, candidate.display()));
+ diag.note(&format!("candidate #{}: {}", i + 1, candidate.display()));
}
diag
}
}
#[derive(Diagnostic)]
-#[diag(metadata_multiple_matching_crates, code = "E0464")]
-#[note]
-pub struct MultipleMatchingCrates {
- #[primary_span]
- pub span: Span,
- pub crate_name: Symbol,
- pub candidates: String,
-}
-
-#[derive(Diagnostic)]
#[diag(metadata_symbol_conflicts_current, code = "E0519")]
pub struct SymbolConflictsCurrent {
#[primary_span]