about summary refs log tree commit diff
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-10-24 13:29:51 +0200
committerflip1995 <hello@philkrones.com>2019-10-24 13:29:51 +0200
commit237e168b89d8e0070d05f61b67f0896b97530c34 (patch)
tree2d91cae0981adcb4de467e476b8ddfab8bfe35d6
parentef02e3a755150085aa30b379ce06ce93d74a9d52 (diff)
downloadrust-237e168b89d8e0070d05f61b67f0896b97530c34.tar.gz
rust-237e168b89d8e0070d05f61b67f0896b97530c34.zip
Fix tests
-rw-r--r--clippy_lints/src/lib.rs3
-rw-r--r--clippy_lints/src/utils/internal_lints.rs4
-rw-r--r--tests/ui/lint_without_lint_pass.rs4
3 files changed, 3 insertions, 8 deletions
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs
index 0cc3a2cd0db..5335bf6e2fb 100644
--- a/clippy_lints/src/lib.rs
+++ b/clippy_lints/src/lib.rs
@@ -914,7 +914,6 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
     store.register_late_pass(|| box trait_bounds::TraitBounds);
     store.register_late_pass(|| box comparison_chain::ComparisonChain);
     store.register_late_pass(|| box mul_add::MulAddCheck);
-
     store.register_early_pass(|| box reference::DerefAddrOf);
     store.register_early_pass(|| box reference::RefInDeref);
     store.register_early_pass(|| box double_parens::DoubleParens);
@@ -939,6 +938,8 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
     store.register_early_pass(|| box utils::internal_lints::ClippyLintsInternal);
     let p = conf.enum_variant_name_threshold;
     store.register_early_pass(move || box enum_variants::EnumVariantNames::new(p));
+    store.register_late_pass(|| box unused_self::UnusedSelf);
+    store.register_late_pass(|| box mutable_debug_assertion::DebugAssertWithMutCall);
 
     store.register_group(true, "clippy::restriction", Some("clippy_restriction"), vec![
         LintId::of(&arithmetic::FLOAT_ARITHMETIC),
diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs
index 96b00eb154a..bc8084f85de 100644
--- a/clippy_lints/src/utils/internal_lints.rs
+++ b/clippy_lints/src/utils/internal_lints.rs
@@ -275,9 +275,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CompilerLintFunctions {
     }
 }
 
-pub struct OuterExpnDataPass;
-
-impl_lint_pass!(OuterExpnDataPass => [OUTER_EXPN_EXPN_DATA]);
+declare_lint_pass!(OuterExpnDataPass => [OUTER_EXPN_EXPN_DATA]);
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for OuterExpnDataPass {
     fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
diff --git a/tests/ui/lint_without_lint_pass.rs b/tests/ui/lint_without_lint_pass.rs
index 81b63984891..98c4cfba76a 100644
--- a/tests/ui/lint_without_lint_pass.rs
+++ b/tests/ui/lint_without_lint_pass.rs
@@ -22,10 +22,6 @@ declare_clippy_lint! {
 
 pub struct Pass;
 impl LintPass for Pass {
-    fn get_lints(&self) -> LintArray {
-        lint_array!(TEST_LINT_REGISTERED)
-    }
-
     fn name(&self) -> &'static str {
         "TEST_LINT"
     }