about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-05-11 13:39:19 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2021-05-12 13:58:44 +0200
commit44c1ef879773fa7893529bcd18f9024bc91bb8f6 (patch)
treed76900f5fbc18a448490a6e128b8c88fe3497b31
parentb03b74734b35649a92500686347a8678b48746e5 (diff)
downloadrust-44c1ef879773fa7893529bcd18f9024bc91bb8f6.tar.gz
rust-44c1ef879773fa7893529bcd18f9024bc91bb8f6.zip
Use () for inherent_impls.
-rw-r--r--clippy_lints/src/inherent_impl.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/inherent_impl.rs b/clippy_lints/src/inherent_impl.rs
index c31013e49be..4e0b1ae78df 100644
--- a/clippy_lints/src/inherent_impl.rs
+++ b/clippy_lints/src/inherent_impl.rs
@@ -3,7 +3,7 @@
 use clippy_utils::diagnostics::span_lint_and_then;
 use clippy_utils::in_macro;
 use rustc_hir::def_id::DefIdMap;
-use rustc_hir::{def_id, Crate, Impl, Item, ItemKind};
+use rustc_hir::{Crate, Impl, Item, ItemKind};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_session::{declare_tool_lint, impl_lint_pass};
 use rustc_span::Span;
@@ -68,7 +68,7 @@ impl<'tcx> LateLintPass<'tcx> for MultipleInherentImpl {
     fn check_crate_post(&mut self, cx: &LateContext<'tcx>, krate: &'tcx Crate<'_>) {
         if !krate.items.is_empty() {
             // Retrieve all inherent implementations from the crate, grouped by type
-            for impls in cx.tcx.crate_inherent_impls(def_id::LOCAL_CRATE).inherent_impls.values() {
+            for impls in cx.tcx.crate_inherent_impls(()).inherent_impls.values() {
                 // Filter out implementations that have generic params (type or lifetime)
                 let mut impl_spans = impls.iter().filter_map(|impl_def| self.impls.get(impl_def));
                 if let Some(initial_span) = impl_spans.next() {