@@ -1019,7 +1019,7 @@ impl<'tcx> Clean<'tcx, bool> for hir::IsAuto {
1019
1019
1020
1020
impl < ' tcx > Clean < ' tcx , Path > for hir:: TraitRef < ' tcx > {
1021
1021
fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> Path {
1022
- let path = self . path . clean ( cx) ;
1022
+ let path = clean_path ( self . path , cx) ;
1023
1023
register_res ( cx, path. res ) ;
1024
1024
path
1025
1025
}
@@ -1344,7 +1344,7 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type
1344
1344
if let Some ( expanded) = maybe_expand_private_type_alias ( cx, path) {
1345
1345
expanded
1346
1346
} else {
1347
- let path = path . clean ( cx) ;
1347
+ let path = clean_path ( path , cx) ;
1348
1348
resolve_type ( cx, path)
1349
1349
}
1350
1350
}
@@ -1380,7 +1380,7 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type
1380
1380
ty:: Error ( _) => return Type :: Infer ,
1381
1381
_ => bug ! ( "clean: expected associated type, found `{:?}`" , ty) ,
1382
1382
} ;
1383
- let trait_ = hir:: Path { span, res, segments : & [ ] } . clean ( cx) ;
1383
+ let trait_ = clean_path ( & hir:: Path { span, res, segments : & [ ] } , cx) ;
1384
1384
register_res ( cx, trait_. res ) ;
1385
1385
let self_def_id = res. opt_def_id ( ) ;
1386
1386
let self_type = clean_ty ( qself, cx) ;
@@ -1857,10 +1857,8 @@ fn clean_variant_data<'tcx>(
1857
1857
}
1858
1858
}
1859
1859
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 ( ) }
1864
1862
}
1865
1863
1866
1864
impl < ' tcx > Clean < ' tcx , GenericArgs > for hir:: GenericArgs < ' tcx > {
@@ -2172,7 +2170,7 @@ fn clean_use_statement<'tcx>(
2172
2170
2173
2171
// Also check whether imports were asked to be inlined, in case we're trying to re-export a
2174
2172
// crate in Rust 2018+
2175
- let path = path . clean ( cx) ;
2173
+ let path = clean_path ( path , cx) ;
2176
2174
let inner = if kind == hir:: UseKind :: Glob {
2177
2175
if !denied {
2178
2176
let mut visited = FxHashSet :: default ( ) ;
0 commit comments