rust/compiler/rustc_error_codes/src/lib.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
667 B
Rust
Raw Normal View History

#![cfg_attr(not(bootstrap), allow(internal_features))]
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
#![cfg_attr(not(bootstrap), doc(rust_logo))]
2021-03-26 20:10:21 +00:00
#![deny(rustdoc::invalid_codeblock_attributes)]
#![deny(rustc::untranslatable_diagnostic)]
#![deny(rustc::diagnostic_outside_of_impl)]
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.
macro_rules! register_diagnostics {
($($ecode:ident: $message:expr,)*) => (
pub static DIAGNOSTICS: &[(&str, &str)] = &[
$( (stringify!($ecode), $message), )*
];
)
}
mod error_codes;
pub use error_codes::DIAGNOSTICS;