about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/errors.rs
diff options
context:
space:
mode:
authorNathan Stocks <cleancut@github.com>2022-08-23 11:20:01 -0600
committerNathan Stocks <cleancut@github.com>2022-08-25 11:06:45 -0600
commit40f44736e805d0576918bb7679e2737a704590f1 (patch)
tree4e17e7d4dc2115a892598ddd5bac6efa58256b53 /compiler/rustc_monomorphize/src/errors.rs
parent137f20c11265ea70e3ed3ed7798662b9abfbaad2 (diff)
downloadrust-40f44736e805d0576918bb7679e2737a704590f1.tar.gz
rust-40f44736e805d0576918bb7679e2737a704590f1.zip
replace some usages of [Span]FatalError with error-specific types
Diffstat (limited to 'compiler/rustc_monomorphize/src/errors.rs')
-rw-r--r--compiler/rustc_monomorphize/src/errors.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/compiler/rustc_monomorphize/src/errors.rs b/compiler/rustc_monomorphize/src/errors.rs
index 62ebac97136..fa7655f2624 100644
--- a/compiler/rustc_monomorphize/src/errors.rs
+++ b/compiler/rustc_monomorphize/src/errors.rs
@@ -39,14 +39,6 @@ pub struct FatalError {
     pub error_message: String,
 }
 
-#[derive(SessionDiagnostic)]
-#[diag(monomorphize::fatal_error)]
-pub struct SpanFatalError {
-    #[primary_span]
-    pub span: Span,
-    pub error_message: String,
-}
-
 pub struct UnusedGenericParams {
     pub span: Span,
     pub param_spans: Vec<Span>,
@@ -79,3 +71,15 @@ pub struct LargeAssignmentsLint {
     pub size: u64,
     pub limit: u64,
 }
+
+#[derive(SessionDiagnostic)]
+#[diag(monomorphize::unknown_partition_strategy)]
+pub struct UnknownPartitionStrategy;
+
+#[derive(SessionDiagnostic)]
+#[diag(monomorphize::symbol_already_defined)]
+pub struct SymbolAlreadyDefined {
+    #[primary_span]
+    pub span: Option<Span>,
+    pub symbol: String,
+}