2021-03-26 20:10:21 +00:00
|
|
|
#![deny(rustdoc::invalid_codeblock_attributes)]
|
2019-11-15 18:41:50 +00:00
|
|
|
//! This library is used to gather all error codes into one place,
|
|
|
|
//! the goal being to make their maintenance easier.
|
2019-11-11 21:45:32 +00:00
|
|
|
|
|
|
|
macro_rules! register_diagnostics {
|
|
|
|
($($ecode:ident: $message:expr,)* ; $($code:ident,)*) => (
|
2020-02-28 22:32:09 +00:00
|
|
|
pub static DIAGNOSTICS: &[(&str, Option<&str>)] = &[
|
|
|
|
$( (stringify!($ecode), Some($message)), )*
|
|
|
|
$( (stringify!($code), None), )*
|
2019-11-11 21:45:32 +00:00
|
|
|
];
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
mod error_codes;
|
2020-01-18 20:53:53 +00:00
|
|
|
pub use error_codes::DIAGNOSTICS;
|