@@ -1118,10 +1118,10 @@ impl Clean<Item> for hir::ImplItem<'_> {
1118
1118
}
1119
1119
MethodItem ( m, Some ( self . defaultness ) )
1120
1120
}
1121
- hir:: ImplItemKind :: TyAlias ( ref ty ) => {
1122
- let type_ = ty . clean ( cx) ;
1123
- let item_type = type_ . def_id ( ) . and_then ( |did| inline :: build_ty ( cx , did ) ) ;
1124
- TypedefItem ( Typedef { type_, generics : Generics :: default ( ) , item_type } , true )
1121
+ hir:: ImplItemKind :: TyAlias ( ref hir_ty ) => {
1122
+ let type_ = hir_ty . clean ( cx) ;
1123
+ let item_type = hir_ty_to_ty ( cx . tcx , hir_ty ) . clean ( cx ) ;
1124
+ TypedefItem ( Typedef { type_, generics : Generics :: default ( ) , item_type : Some ( item_type ) } , true )
1125
1125
}
1126
1126
} ;
1127
1127
Item :: from_def_id_and_parts ( local_did, Some ( self . ident . name ) , inner, cx)
@@ -1267,13 +1267,13 @@ impl Clean<Item> for ty::AssocItem {
1267
1267
1268
1268
AssocTypeItem ( bounds, ty. clean ( cx) )
1269
1269
} else {
1270
+ // FIXME: when could this happen? ASsociated items in inherent impls?
1270
1271
let type_ = cx. tcx . type_of ( self . def_id ) . clean ( cx) ;
1271
- let item_type = type_. def_id ( ) . and_then ( |did| inline:: build_ty ( cx, did) ) ;
1272
1272
TypedefItem (
1273
1273
Typedef {
1274
- type_,
1274
+ type_ : type_ . clone ( ) ,
1275
1275
generics : Generics { params : Vec :: new ( ) , where_predicates : Vec :: new ( ) } ,
1276
- item_type,
1276
+ item_type : Some ( type_ ) ,
1277
1277
} ,
1278
1278
true ,
1279
1279
)
@@ -1986,11 +1986,11 @@ impl Clean<Vec<Item>> for (&hir::Item<'_>, Option<Symbol>) {
1986
1986
bounds : ty. bounds . clean ( cx) ,
1987
1987
generics : ty. generics . clean ( cx) ,
1988
1988
} ) ,
1989
- ItemKind :: TyAlias ( ty , ref generics) => {
1990
- let rustdoc_ty = ty . clean ( cx) ;
1991
- let item_type = rustdoc_ty . def_id ( ) . and_then ( |did| inline :: build_ty ( cx , did ) ) ;
1989
+ ItemKind :: TyAlias ( hir_ty , ref generics) => {
1990
+ let rustdoc_ty = hir_ty . clean ( cx) ;
1991
+ let ty = hir_ty_to_ty ( cx . tcx , hir_ty ) ;
1992
1992
TypedefItem (
1993
- Typedef { type_ : rustdoc_ty, generics : generics. clean ( cx) , item_type } ,
1993
+ Typedef { type_ : rustdoc_ty, generics : generics. clean ( cx) , item_type : Some ( ty . clean ( cx ) ) } ,
1994
1994
false ,
1995
1995
)
1996
1996
}
0 commit comments