about summary refs log tree commit diff
path: root/compiler/rustc_driver/src/session_diagnostics.rs
diff options
context:
space:
mode:
authorAdrian Tombu <adrian@otso.fr>2022-08-22 23:43:09 +0200
committerAdrian Tombu <adrian@otso.fr>2022-08-25 18:06:11 +0200
commitdbe39d835e93d784076b96564176825e556e8824 (patch)
treebde0a725f8f1a4938649411ff48620676edc18ab /compiler/rustc_driver/src/session_diagnostics.rs
parent4d45b0745ab227feb9000bc15713ade4b99241ea (diff)
downloadrust-dbe39d835e93d784076b96564176825e556e8824.tar.gz
rust-dbe39d835e93d784076b96564176825e556e8824.zip
Start moving rustc_driver to SessionDiagnostic
Diffstat (limited to 'compiler/rustc_driver/src/session_diagnostics.rs')
-rw-r--r--compiler/rustc_driver/src/session_diagnostics.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/compiler/rustc_driver/src/session_diagnostics.rs b/compiler/rustc_driver/src/session_diagnostics.rs
new file mode 100644
index 00000000000..19468cb678d
--- /dev/null
+++ b/compiler/rustc_driver/src/session_diagnostics.rs
@@ -0,0 +1,25 @@
+use rustc_macros::SessionDiagnostic;
+use rustc_span::Span;
+
+#[derive(SessionDiagnostic)]
+#[error(driver::rlink_unable_to_read)]
+pub(crate) struct RlinkUnableToRead {
+    #[primary_span]
+    pub span: Span,
+    pub error_message: String,
+}
+
+#[derive(SessionDiagnostic)]
+#[error(driver::rlink_unable_to_deserialize)]
+pub(crate) struct RlinkUnableToDeserialize {
+    #[primary_span]
+    pub span: Span,
+    pub error_message: String,
+}
+
+#[derive(SessionDiagnostic)]
+#[error(driver::rlink_no_a_file)]
+pub(crate) struct RlinkNotAFile {
+    #[primary_span]
+    pub span: Span,
+}