@@ -1019,7 +1019,7 @@ impl<'tcx> Clean<'tcx, bool> for hir::IsAuto {
10191019
10201020impl < ' tcx > Clean < ' tcx , Path > for hir:: TraitRef < ' tcx > {
10211021 fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> Path {
1022- let path = self . path . clean ( cx) ;
1022+ let path = clean_path ( self . path , cx) ;
10231023 register_res ( cx, path. res ) ;
10241024 path
10251025 }
@@ -1344,7 +1344,7 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type
13441344 if let Some ( expanded) = maybe_expand_private_type_alias ( cx, path) {
13451345 expanded
13461346 } else {
1347- let path = path . clean ( cx) ;
1347+ let path = clean_path ( path , cx) ;
13481348 resolve_type ( cx, path)
13491349 }
13501350 }
@@ -1380,7 +1380,7 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type
13801380 ty:: Error ( _) => return Type :: Infer ,
13811381 _ => bug ! ( "clean: expected associated type, found `{:?}`" , ty) ,
13821382 } ;
1383- let trait_ = hir:: Path { span, res, segments : & [ ] } . clean ( cx) ;
1383+ let trait_ = clean_path ( & hir:: Path { span, res, segments : & [ ] } , cx) ;
13841384 register_res ( cx, trait_. res ) ;
13851385 let self_def_id = res. opt_def_id ( ) ;
13861386 let self_type = clean_ty ( qself, cx) ;
@@ -1857,10 +1857,8 @@ fn clean_variant_data<'tcx>(
18571857 }
18581858}
18591859
1860- impl < ' tcx > Clean < ' tcx , Path > for hir:: Path < ' tcx > {
1861- fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> Path {
1862- Path { res : self . res , segments : self . segments . iter ( ) . map ( |x| x. clean ( cx) ) . collect ( ) }
1863- }
1860+ fn clean_path < ' tcx > ( path : & hir:: Path < ' tcx > , cx : & mut DocContext < ' tcx > ) -> Path {
1861+ Path { res : path. res , segments : path. segments . iter ( ) . map ( |x| x. clean ( cx) ) . collect ( ) }
18641862}
18651863
18661864impl < ' tcx > Clean < ' tcx , GenericArgs > for hir:: GenericArgs < ' tcx > {
@@ -2172,7 +2170,7 @@ fn clean_use_statement<'tcx>(
21722170
21732171 // Also check whether imports were asked to be inlined, in case we're trying to re-export a
21742172 // crate in Rust 2018+
2175- let path = path . clean ( cx) ;
2173+ let path = clean_path ( path , cx) ;
21762174 let inner = if kind == hir:: UseKind :: Glob {
21772175 if !denied {
21782176 let mut visited = FxHashSet :: default ( ) ;
0 commit comments