about summary refs log tree commit diff
path: root/src/librustc_error_codes
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-15 19:41:50 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-11-16 02:32:33 +0100
commit8444e1628cd5e2d7229b3176cb5b248271defe22 (patch)
tree804e8211f47a7f722baec02f9f1a1447595a2b79 /src/librustc_error_codes
parent1bd30ce2aac40c7698aa4a1b9520aa649ff2d1c5 (diff)
move DIAGNOSTICS usage to rustc_driver
Diffstat (limited to 'src/librustc_error_codes')
-rw-r--r--src/librustc_error_codes/error_codes.rs3
-rw-r--r--src/librustc_error_codes/lib.rs11
2 files changed, 4 insertions, 10 deletions
diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs
index ffefe51f854..428cecf13a3 100644
--- a/src/librustc_error_codes/error_codes.rs
+++ b/src/librustc_error_codes/error_codes.rs
@@ -7,8 +7,7 @@
 // Error messages' format must follow the RFC 1567 available here:
 // https://github.com/rust-lang/rfcs/pull/1567
 
-crate::register_diagnostics! {
-
+register_diagnostics! {
 E0001: include_str!("./error_codes/E0001.md"),
 E0002: include_str!("./error_codes/E0002.md"),
 E0004: include_str!("./error_codes/E0004.md"),
diff --git a/src/librustc_error_codes/lib.rs b/src/librustc_error_codes/lib.rs
index 36b1518c869..14210fd69ad 100644
--- a/src/librustc_error_codes/lib.rs
+++ b/src/librustc_error_codes/lib.rs
@@ -1,19 +1,14 @@
-//! This library is used to gather all error codes into one place. The goal
-//! being to make their maintenance easier.
+//! This library is used to gather all error codes into one place,
+//! the goal being to make their maintenance easier.
 
-#[macro_export]
 macro_rules! register_diagnostics {
-    ($($ecode:ident: $message:expr,)*) => (
-        $crate::register_diagnostics!{$($ecode:$message,)* ;}
-    );
-
     ($($ecode:ident: $message:expr,)* ; $($code:ident,)*) => (
         pub static DIAGNOSTICS: &[(&str, &str)] = &[
             $( (stringify!($ecode), $message), )*
         ];
 
         $(
-            pub const $ecode: &str = $message;
+            pub const $ecode: () = ();
         )*
         $(
             pub const $code: () = ();