@@ -405,14 +405,12 @@ fn clean_middle_term<'tcx>(term: ty::Term<'tcx>, cx: &mut DocContext<'tcx>) -> T
405
405
}
406
406
}
407
407
408
- impl < ' tcx > Clean < ' tcx , Term > for hir:: Term < ' tcx > {
409
- fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> Term {
410
- match self {
411
- hir:: Term :: Ty ( ty) => Term :: Type ( clean_ty ( ty, cx) ) ,
412
- hir:: Term :: Const ( c) => {
413
- let def_id = cx. tcx . hir ( ) . local_def_id ( c. hir_id ) ;
414
- Term :: Constant ( clean_middle_const ( ty:: Const :: from_anon_const ( cx. tcx , def_id) , cx) )
415
- }
408
+ fn clean_hir_term < ' tcx > ( term : & hir:: Term < ' tcx > , cx : & mut DocContext < ' tcx > ) -> Term {
409
+ match term {
410
+ hir:: Term :: Ty ( ty) => Term :: Type ( clean_ty ( ty, cx) ) ,
411
+ hir:: Term :: Const ( c) => {
412
+ let def_id = cx. tcx . hir ( ) . local_def_id ( c. hir_id ) ;
413
+ Term :: Constant ( clean_middle_const ( ty:: Const :: from_anon_const ( cx. tcx , def_id) , cx) )
416
414
}
417
415
}
418
416
}
@@ -2283,7 +2281,7 @@ impl<'tcx> Clean<'tcx, TypeBindingKind> for hir::TypeBindingKind<'tcx> {
2283
2281
fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> TypeBindingKind {
2284
2282
match * self {
2285
2283
hir:: TypeBindingKind :: Equality { ref term } => {
2286
- TypeBindingKind :: Equality { term : term . clean ( cx) }
2284
+ TypeBindingKind :: Equality { term : clean_hir_term ( term , cx) }
2287
2285
}
2288
2286
hir:: TypeBindingKind :: Constraint { bounds } => TypeBindingKind :: Constraint {
2289
2287
bounds : bounds. iter ( ) . filter_map ( |b| b. clean ( cx) ) . collect ( ) ,
0 commit comments