-use clippy_utils::paths;
-use clippy_utils::ty::{is_normalizable, is_type_diagnostic_item, match_type};
+use clippy_utils::ty::{is_normalizable, is_type_diagnostic_item};
use if_chain::if_chain;
use rustc_hir::{self as hir, HirId, ItemKind, Node};
use rustc_lint::{LateContext, LateLintPass};
use if_chain::if_chain;
use rustc_hir::{self as hir, HirId, ItemKind, Node};
use rustc_lint::{LateContext, LateLintPass};
/// containing zero sized values is effectively a set. Using a set in that case improves
/// readability and communicates intent more clearly.
///
/// containing zero sized values is effectively a set. Using a set in that case improves
/// readability and communicates intent more clearly.
///
/// * A zero-sized type cannot be recovered later if it contains private fields.
/// * This lints the signature of public items
///
/// * A zero-sized type cannot be recovered later if it contains private fields.
/// * This lints the signature of public items
///
/// ```rust
/// # use std::collections::HashMap;
/// fn unique_words(text: &str) -> HashMap<&str, ()> {
/// ```rust
/// # use std::collections::HashMap;
/// fn unique_words(text: &str) -> HashMap<&str, ()> {
if !hir_ty.span.from_expansion();
if !in_trait_impl(cx, hir_ty.hir_id);
let ty = ty_from_hir_ty(cx, hir_ty);
if !hir_ty.span.from_expansion();
if !in_trait_impl(cx, hir_ty.hir_id);
let ty = ty_from_hir_ty(cx, hir_ty);
- if is_type_diagnostic_item(cx, ty, sym::hashmap_type) || match_type(cx, ty, &paths::BTREEMAP);
+ if is_type_diagnostic_item(cx, ty, sym::hashmap_type) || is_type_diagnostic_item(cx, ty, sym::BTreeMap);
if let Adt(_, substs) = ty.kind();
let ty = substs.type_at(1);
// Fixes https://github.com/rust-lang/rust-clippy/issues/7447 because of
if let Adt(_, substs) = ty.kind();
let ty = substs.type_at(1);
// Fixes https://github.com/rust-lang/rust-clippy/issues/7447 because of