diff options
| author | Ezra Shaw <ezrasure@outlook.com> | 2023-02-25 20:14:10 +1300 |
|---|---|---|
| committer | Ezra Shaw <ezrasure@outlook.com> | 2023-02-26 20:12:36 +1300 |
| commit | 90677edcba063ee83316ef109e0fe54116015575 (patch) | |
| tree | 2ccfefb0af2241e8b52e20bfea7a09b44b07c20d /compiler/rustc_error_codes/src/lib.rs | |
| parent | 70fd012439d75fd6ce561a6518b9b8fd399f455f (diff) | |
| download | rust-90677edcba063ee83316ef109e0fe54116015575.tar.gz rust-90677edcba063ee83316ef109e0fe54116015575.zip | |
refactor: statically guarantee that current error codes are documented
Diffstat (limited to 'compiler/rustc_error_codes/src/lib.rs')
| -rw-r--r-- | compiler/rustc_error_codes/src/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_error_codes/src/lib.rs b/compiler/rustc_error_codes/src/lib.rs index bd424dd9d06..d6b120e4dfc 100644 --- a/compiler/rustc_error_codes/src/lib.rs +++ b/compiler/rustc_error_codes/src/lib.rs @@ -5,10 +5,9 @@ //! the goal being to make their maintenance easier. macro_rules! register_diagnostics { - ($($ecode:ident: $message:expr,)* ; $($code:ident,)*) => ( - pub static DIAGNOSTICS: &[(&str, Option<&str>)] = &[ - $( (stringify!($ecode), Some($message)), )* - $( (stringify!($code), None), )* + ($($ecode:ident: $message:expr,)*) => ( + pub static DIAGNOSTICS: &[(&str, &str)] = &[ + $( (stringify!($ecode), $message), )* ]; ) } |
