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