-#[allow(missing_copy_implementations)]
-pub struct MatchPass;
-
-impl LintPass for MatchPass {
- fn get_lints(&self) -> LintArray {
- lint_array!(
- SINGLE_MATCH,
- MATCH_REF_PATS,
- MATCH_BOOL,
- SINGLE_MATCH_ELSE,
- MATCH_OVERLAPPING_ARM,
- MATCH_WILD_ERR_ARM,
- MATCH_AS_REF,
- WILDCARD_ENUM_MATCH_ARM
- )
- }
-
- fn name(&self) -> &'static str {
- "Matches"
- }
-}
-
-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MatchPass {
+declare_lint_pass!(Matches => [
+ SINGLE_MATCH,
+ MATCH_REF_PATS,
+ MATCH_BOOL,
+ SINGLE_MATCH_ELSE,
+ MATCH_OVERLAPPING_ARM,
+ MATCH_WILD_ERR_ARM,
+ MATCH_AS_REF,
+ WILDCARD_ENUM_MATCH_ARM
+]);
+
+impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Matches {