@@ -1068,11 +1068,11 @@ impl<'tcx> Clean<'tcx, Item> for hir::TraitItem<'tcx> {
10681068 let bounds = bounds. iter ( ) . filter_map ( |x| x. clean ( cx) ) . collect ( ) ;
10691069 let item_type = clean_middle_ty ( hir_ty_to_ty ( cx. tcx , default) , cx, None ) ;
10701070 AssocTypeItem (
1071- Typedef {
1071+ Box :: new ( Typedef {
10721072 type_ : clean_ty ( default, cx) ,
10731073 generics,
10741074 item_type : Some ( item_type) ,
1075- } ,
1075+ } ) ,
10761076 bounds,
10771077 )
10781078 }
@@ -1109,7 +1109,7 @@ impl<'tcx> Clean<'tcx, Item> for hir::ImplItem<'tcx> {
11091109 let generics = self . generics . clean ( cx) ;
11101110 let item_type = clean_middle_ty ( hir_ty_to_ty ( cx. tcx , hir_ty) , cx, None ) ;
11111111 AssocTypeItem (
1112- Typedef { type_, generics, item_type : Some ( item_type) } ,
1112+ Box :: new ( Typedef { type_, generics, item_type : Some ( item_type) } ) ,
11131113 Vec :: new ( ) ,
11141114 )
11151115 }
@@ -1282,7 +1282,7 @@ impl<'tcx> Clean<'tcx, Item> for ty::AssocItem {
12821282
12831283 if self . defaultness . has_value ( ) {
12841284 AssocTypeItem (
1285- Typedef {
1285+ Box :: new ( Typedef {
12861286 type_ : clean_middle_ty (
12871287 tcx. type_of ( self . def_id ) ,
12881288 cx,
@@ -1291,7 +1291,7 @@ impl<'tcx> Clean<'tcx, Item> for ty::AssocItem {
12911291 generics,
12921292 // FIXME: should we obtain the Type from HIR and pass it on here?
12931293 item_type : None ,
1294- } ,
1294+ } ) ,
12951295 bounds,
12961296 )
12971297 } else {
@@ -1300,11 +1300,11 @@ impl<'tcx> Clean<'tcx, Item> for ty::AssocItem {
13001300 } else {
13011301 // FIXME: when could this happen? Associated items in inherent impls?
13021302 AssocTypeItem (
1303- Typedef {
1303+ Box :: new ( Typedef {
13041304 type_ : clean_middle_ty ( tcx. type_of ( self . def_id ) , cx, Some ( self . def_id ) ) ,
13051305 generics : Generics { params : Vec :: new ( ) , where_predicates : Vec :: new ( ) } ,
13061306 item_type : None ,
1307- } ,
1307+ } ) ,
13081308 Vec :: new ( ) ,
13091309 )
13101310 }
@@ -1949,11 +1949,11 @@ fn clean_maybe_renamed_item<'tcx>(
19491949 ItemKind :: TyAlias ( hir_ty, generics) => {
19501950 let rustdoc_ty = clean_ty ( hir_ty, cx) ;
19511951 let ty = clean_middle_ty ( hir_ty_to_ty ( cx. tcx , hir_ty) , cx, None ) ;
1952- TypedefItem ( Typedef {
1952+ TypedefItem ( Box :: new ( Typedef {
19531953 type_ : rustdoc_ty,
19541954 generics : generics. clean ( cx) ,
19551955 item_type : Some ( ty) ,
1956- } )
1956+ } ) )
19571957 }
19581958 ItemKind :: Enum ( ref def, generics) => EnumItem ( Enum {
19591959 variants : def. variants . iter ( ) . map ( |v| v. clean ( cx) ) . collect ( ) ,
@@ -2041,7 +2041,7 @@ fn clean_impl<'tcx>(
20412041 _ => None ,
20422042 } ) ;
20432043 let mut make_item = |trait_ : Option < Path > , for_ : Type , items : Vec < Item > | {
2044- let kind = ImplItem ( Impl {
2044+ let kind = ImplItem ( Box :: new ( Impl {
20452045 unsafety : impl_. unsafety ,
20462046 generics : impl_. generics . clean ( cx) ,
20472047 trait_,
@@ -2053,7 +2053,7 @@ fn clean_impl<'tcx>(
20532053 } else {
20542054 ImplKind :: Normal
20552055 } ,
2056- } ) ;
2056+ } ) ) ;
20572057 Item :: from_hir_id_and_parts ( hir_id, None , kind, cx)
20582058 } ;
20592059 if let Some ( type_alias) = type_alias {
0 commit comments