@@ -1582,12 +1582,12 @@ fn normalize<'tcx>(cx: &mut DocContext<'tcx>, ty: Ty<'_>) -> Option<Ty<'tcx>> {
15821582}
15831583
15841584pub ( crate ) fn clean_middle_ty < ' tcx > (
1585- this : Ty < ' tcx > ,
1585+ ty : Ty < ' tcx > ,
15861586 cx : & mut DocContext < ' tcx > ,
15871587 def_id : Option < DefId > ,
15881588) -> Type {
1589- trace ! ( "cleaning type: {:?}" , this ) ;
1590- let ty = normalize ( cx, this ) . unwrap_or ( this ) ;
1589+ trace ! ( "cleaning type: {:?}" , ty ) ;
1590+ let ty = normalize ( cx, ty ) . unwrap_or ( ty ) ;
15911591 match * ty. kind ( ) {
15921592 ty:: Never => Primitive ( PrimitiveType :: Never ) ,
15931593 ty:: Bool => Primitive ( PrimitiveType :: Bool ) ,
@@ -1610,7 +1610,6 @@ pub(crate) fn clean_middle_ty<'tcx>(
16101610 type_ : Box :: new ( clean_middle_ty ( ty, cx, None ) ) ,
16111611 } ,
16121612 ty:: FnDef ( ..) | ty:: FnPtr ( _) => {
1613- let ty = cx. tcx . lift ( this) . expect ( "FnPtr lift failed" ) ;
16141613 let sig = ty. fn_sig ( cx. tcx ) ;
16151614 let decl = clean_fn_decl_from_did_and_sig ( cx, None , sig) ;
16161615 BareFunction ( Box :: new ( BareFunctionDecl {
@@ -1644,7 +1643,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
16441643 let did = obj
16451644 . principal_def_id ( )
16461645 . or_else ( || dids. next ( ) )
1647- . unwrap_or_else ( || panic ! ( "found trait object `{:?}` with no traits?" , this ) ) ;
1646+ . unwrap_or_else ( || panic ! ( "found trait object `{:?}` with no traits?" , ty ) ) ;
16481647 let substs = match obj. principal ( ) {
16491648 Some ( principal) => principal. skip_binder ( ) . substs ,
16501649 // marker traits have no substs.
0 commit comments