diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-11 13:39:19 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-12 13:58:44 +0200 |
| commit | 837f3e3e67007d748e993a080c3ea4b07ee465a0 (patch) | |
| tree | 91c31527b229ab32be6d55d7717ad66b19c049bf /src/tools/clippy | |
| parent | 3aa6f3e8f52e72599d8588025adfe55a9a934c49 (diff) | |
| download | rust-837f3e3e67007d748e993a080c3ea4b07ee465a0.tar.gz rust-837f3e3e67007d748e993a080c3ea4b07ee465a0.zip | |
Use () for inherent_impls.
Diffstat (limited to 'src/tools/clippy')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/inherent_impl.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_lints/src/inherent_impl.rs b/src/tools/clippy/clippy_lints/src/inherent_impl.rs index c31013e49be..4e0b1ae78df 100644 --- a/src/tools/clippy/clippy_lints/src/inherent_impl.rs +++ b/src/tools/clippy/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() { |
