Skip to content

Commit

Permalink
Simplify rustc_lint_defs::lint_array
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Sep 28, 2023
1 parent c01d8d2 commit 6396e9e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_lint_defs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,7 @@ macro_rules! declare_tool_lint {
/// Declares a static `LintArray` and return it as an expression.
#[macro_export]
macro_rules! lint_array {
($( $lint:expr ),* ,) => { lint_array!( $($lint),* ) };
($( $lint:expr ),*) => {{
vec![$($lint),*]
}}
($( $lint:expr ),* $(,)?) => { vec![$($lint),*] }
}

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

0 comments on commit 6396e9e

Please sign in to comment.