1- use clippy_utils:: PathNS ;
1+ use clippy_utils:: paths :: { PathNS , find_crates , lookup_path } ;
22use rustc_data_structures:: fx:: FxHashMap ;
33use rustc_errors:: { Applicability , Diag } ;
44use rustc_hir:: PrimTy ;
@@ -148,7 +148,7 @@ pub fn create_disallowed_map<const REPLACEMENT_ALLOWED: bool>(
148148 for disallowed_path in disallowed_paths {
149149 let path = disallowed_path. path ( ) ;
150150 let sym_path: Vec < Symbol > = path. split ( "::" ) . map ( Symbol :: intern) . collect ( ) ;
151- let mut resolutions = clippy_utils :: lookup_path ( tcx, ns, & sym_path) ;
151+ let mut resolutions = lookup_path ( tcx, ns, & sym_path) ;
152152 resolutions. retain ( |& def_id| def_kind_predicate ( tcx. def_kind ( def_id) ) ) ;
153153
154154 let ( prim_ty, found_prim_ty) = if let & [ name] = sym_path. as_slice ( )
@@ -164,10 +164,10 @@ pub fn create_disallowed_map<const REPLACEMENT_ALLOWED: bool>(
164164 && !disallowed_path. allow_invalid
165165 // Don't warn about unloaded crates:
166166 // https://github.com/rust-lang/rust-clippy/pull/14397#issuecomment-2848328221
167- && ( sym_path. len ( ) < 2 || !clippy_utils :: find_crates ( tcx, sym_path[ 0 ] ) . is_empty ( ) )
167+ && ( sym_path. len ( ) < 2 || !find_crates ( tcx, sym_path[ 0 ] ) . is_empty ( ) )
168168 {
169169 // Relookup the path in an arbitrary namespace to get a good `expected, found` message
170- let found_def_ids = clippy_utils :: lookup_path ( tcx, PathNS :: Arbitrary , & sym_path) ;
170+ let found_def_ids = lookup_path ( tcx, PathNS :: Arbitrary , & sym_path) ;
171171 let message = if let Some ( & def_id) = found_def_ids. first ( ) {
172172 let ( article, description) = tcx. article_and_description ( def_id) ;
173173 format ! ( "expected a {predicate_description}, found {article} {description}" )
0 commit comments