From 90677edcba063ee83316ef109e0fe54116015575 Mon Sep 17 00:00:00 2001 From: Ezra Shaw Date: Sat, 25 Feb 2023 20:14:10 +1300 Subject: refactor: statically guarantee that current error codes are documented --- compiler/rustc_error_codes/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_error_codes/src/lib.rs') 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), )* ]; ) } -- cgit 1.4.1-3-g733a5