@@ -1582,12 +1582,12 @@ fn normalize<'tcx>(cx: &mut DocContext<'tcx>, ty: Ty<'_>) -> Option<Ty<'tcx>> {
1582
1582
}
1583
1583
1584
1584
pub ( crate ) fn clean_middle_ty < ' tcx > (
1585
- this : Ty < ' tcx > ,
1585
+ ty : Ty < ' tcx > ,
1586
1586
cx : & mut DocContext < ' tcx > ,
1587
1587
def_id : Option < DefId > ,
1588
1588
) -> 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 ) ;
1591
1591
match * ty. kind ( ) {
1592
1592
ty:: Never => Primitive ( PrimitiveType :: Never ) ,
1593
1593
ty:: Bool => Primitive ( PrimitiveType :: Bool ) ,
@@ -1610,7 +1610,6 @@ pub(crate) fn clean_middle_ty<'tcx>(
1610
1610
type_ : Box :: new ( clean_middle_ty ( ty, cx, None ) ) ,
1611
1611
} ,
1612
1612
ty:: FnDef ( ..) | ty:: FnPtr ( _) => {
1613
- let ty = cx. tcx . lift ( this) . expect ( "FnPtr lift failed" ) ;
1614
1613
let sig = ty. fn_sig ( cx. tcx ) ;
1615
1614
let decl = clean_fn_decl_from_did_and_sig ( cx, None , sig) ;
1616
1615
BareFunction ( Box :: new ( BareFunctionDecl {
@@ -1644,7 +1643,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
1644
1643
let did = obj
1645
1644
. principal_def_id ( )
1646
1645
. 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 ) ) ;
1648
1647
let substs = match obj. principal ( ) {
1649
1648
Some ( principal) => principal. skip_binder ( ) . substs ,
1650
1649
// marker traits have no substs.
0 commit comments