]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/lib.rs
Rollup merge of #104401 - RalfJung:mpsc-leak, r=Amanieu
[rust.git] / compiler / rustc_error_codes / src / lib.rs
1 #![deny(rustdoc::invalid_codeblock_attributes)]
2 #![deny(rustc::untranslatable_diagnostic)]
3 #![deny(rustc::diagnostic_outside_of_impl)]
4 //! This library is used to gather all error codes into one place,
5 //! the goal being to make their maintenance easier.
6
7 macro_rules! register_diagnostics {
8     ($($ecode:ident: $message:expr,)* ; $($code:ident,)*) => (
9         pub static DIAGNOSTICS: &[(&str, Option<&str>)] = &[
10             $( (stringify!($ecode), Some($message)), )*
11             $( (stringify!($code), None), )*
12         ];
13     )
14 }
15
16 mod error_codes;
17 pub use error_codes::DIAGNOSTICS;