From 44d3ea53081f7f0065d54fc29cbfd234b44208a8 Mon Sep 17 00:00:00 2001 From: kennytm <kennytm@gmail.com> Date: Tue, 31 Oct 2017 10:03:54 -0700 Subject: [PATCH] Fix lint_without_lint_pass --- clippy_lints/src/utils/internal_lints.rs | 5 +---- clippy_lints/src/utils/paths.rs | 4 ++-- tests/ui/lint_pass.rs | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs index a35b034d791..6e62f96749e 100644 --- a/clippy_lints/src/utils/internal_lints.rs +++ b/clippy_lints/src/utils/internal_lints.rs @@ -161,16 +161,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LintWithoutLintPass { fn is_lint_ref_type(ty: &Ty) -> bool { if let TyRptr( - ref lt, + _, MutTy { ty: ref inner, mutbl: MutImmutable, }, ) = ty.node { - if lt.is_elided() { - return false; - } if let TyPath(ref path) = inner.node { return match_qpath(path, &paths::LINT); } diff --git a/clippy_lints/src/utils/paths.rs b/clippy_lints/src/utils/paths.rs index 96ccddaf2d0..95e14609182 100644 --- a/clippy_lints/src/utils/paths.rs +++ b/clippy_lints/src/utils/paths.rs @@ -41,8 +41,8 @@ pub const IO_READ: [&str; 3] = ["std", "io", "Read"]; pub const IO_WRITE: [&str; 3] = ["std", "io", "Write"]; pub const ITERATOR: [&str; 4] = ["core", "iter", "iterator", "Iterator"]; pub const LINKED_LIST: [&str; 3] = ["alloc", "linked_list", "LinkedList"]; -pub const LINT: [&str; 3] = ["rustc", "lint", "Lint"]; -pub const LINT_ARRAY: [&str; 3] = ["rustc", "lint", "LintArray"]; +pub const LINT: [&str; 2] = ["lint", "Lint"]; +pub const LINT_ARRAY: [&str; 2] = ["lint", "LintArray"]; pub const MEM_FORGET: [&str; 3] = ["core", "mem", "forget"]; pub const MEM_UNINIT: [&str; 3] = ["core", "mem", "uninitialized"]; pub const MEM_ZEROED: [&str; 3] = ["core", "mem", "zeroed"]; diff --git a/tests/ui/lint_pass.rs b/tests/ui/lint_pass.rs index b576f72e8e7..29c93e745b3 100644 --- a/tests/ui/lint_pass.rs +++ b/tests/ui/lint_pass.rs @@ -2,7 +2,6 @@ #![feature(rustc_private)] #![feature(macro_vis_matcher)] - #![warn(lint_without_lint_pass)] #[macro_use] extern crate rustc;