11use std:: borrow:: Cow ;
22use std:: collections:: BTreeMap ;
33
4+ use clippy_utils:: res:: MaybeDef ;
45use rustc_errors:: { Applicability , Diag } ;
56use rustc_hir:: intravisit:: { Visitor , VisitorExt , walk_body, walk_expr, walk_ty} ;
67use rustc_hir:: { self as hir, AmbigArg , Body , Expr , ExprKind , GenericArg , Item , ItemKind , QPath , TyKind } ;
@@ -14,7 +15,6 @@ use rustc_span::Span;
1415use clippy_utils:: diagnostics:: span_lint_and_then;
1516use clippy_utils:: source:: { IntoSpan , SpanRangeExt , snippet} ;
1617use clippy_utils:: sym;
17- use clippy_utils:: ty:: is_type_diagnostic_item;
1818
1919declare_clippy_lint ! {
2020 /// ### What it does
@@ -227,14 +227,14 @@ impl<'tcx> ImplicitHasherType<'tcx> {
227227
228228 let ty = lower_ty ( cx. tcx , hir_ty) ;
229229
230- if is_type_diagnostic_item ( cx, ty , sym:: HashMap ) && params_len == 2 {
230+ if ty . is_diag_item ( cx, sym:: HashMap ) && params_len == 2 {
231231 Some ( ImplicitHasherType :: HashMap (
232232 hir_ty. span ,
233233 ty,
234234 snippet ( cx, params[ 0 ] . span , "K" ) ,
235235 snippet ( cx, params[ 1 ] . span , "V" ) ,
236236 ) )
237- } else if is_type_diagnostic_item ( cx, ty , sym:: HashSet ) && params_len == 1 {
237+ } else if ty . is_diag_item ( cx, sym:: HashSet ) && params_len == 1 {
238238 Some ( ImplicitHasherType :: HashSet (
239239 hir_ty. span ,
240240 ty,
0 commit comments