@@ -1118,10 +1118,10 @@ impl Clean<Item> for hir::ImplItem<'_> {
11181118 }
11191119 MethodItem ( m, Some ( self . defaultness ) )
11201120 }
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 )
11251125 }
11261126 } ;
11271127 Item :: from_def_id_and_parts ( local_did, Some ( self . ident . name ) , inner, cx)
@@ -1267,13 +1267,13 @@ impl Clean<Item> for ty::AssocItem {
12671267
12681268 AssocTypeItem ( bounds, ty. clean ( cx) )
12691269 } else {
1270+ // FIXME: when could this happen? ASsociated items in inherent impls?
12701271 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) ) ;
12721272 TypedefItem (
12731273 Typedef {
1274- type_,
1274+ type_ : type_ . clone ( ) ,
12751275 generics : Generics { params : Vec :: new ( ) , where_predicates : Vec :: new ( ) } ,
1276- item_type,
1276+ item_type : Some ( type_ ) ,
12771277 } ,
12781278 true ,
12791279 )
@@ -1986,11 +1986,11 @@ impl Clean<Vec<Item>> for (&hir::Item<'_>, Option<Symbol>) {
19861986 bounds : ty. bounds . clean ( cx) ,
19871987 generics : ty. generics . clean ( cx) ,
19881988 } ) ,
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 ) ;
19921992 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 ) ) } ,
19941994 false ,
19951995 )
19961996 }
0 commit comments