Skip to content

Commit 6396e9e

Browse files
committed
Simplify rustc_lint_defs::lint_array
1 parent c01d8d2 commit 6396e9e

File tree

1 file changed

+1
-4
lines changed
  • compiler/rustc_lint_defs/src

1 file changed

+1
-4
lines changed

compiler/rustc_lint_defs/src/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,7 @@ macro_rules! declare_tool_lint {
788788
/// Declares a static `LintArray` and return it as an expression.
789789
#[macro_export]
790790
macro_rules! lint_array {
791-
($( $lint:expr ),* ,) => { lint_array!( $($lint),* ) };
792-
($( $lint:expr ),*) => {{
793-
vec![$($lint),*]
794-
}}
791+
($( $lint:expr ),* $(,)?) => { vec![$($lint),*] }
795792
}
796793

797794
pub type LintArray = Vec<&'static Lint>;

0 commit comments

Comments
 (0)