@@ -1068,11 +1068,11 @@ impl<'tcx> Clean<'tcx, Item> for hir::TraitItem<'tcx> {
1068
1068
let bounds = bounds. iter ( ) . filter_map ( |x| x. clean ( cx) ) . collect ( ) ;
1069
1069
let item_type = clean_middle_ty ( hir_ty_to_ty ( cx. tcx , default) , cx, None ) ;
1070
1070
AssocTypeItem (
1071
- Typedef {
1071
+ Box :: new ( Typedef {
1072
1072
type_ : clean_ty ( default, cx) ,
1073
1073
generics,
1074
1074
item_type : Some ( item_type) ,
1075
- } ,
1075
+ } ) ,
1076
1076
bounds,
1077
1077
)
1078
1078
}
@@ -1109,7 +1109,7 @@ impl<'tcx> Clean<'tcx, Item> for hir::ImplItem<'tcx> {
1109
1109
let generics = self . generics . clean ( cx) ;
1110
1110
let item_type = clean_middle_ty ( hir_ty_to_ty ( cx. tcx , hir_ty) , cx, None ) ;
1111
1111
AssocTypeItem (
1112
- Typedef { type_, generics, item_type : Some ( item_type) } ,
1112
+ Box :: new ( Typedef { type_, generics, item_type : Some ( item_type) } ) ,
1113
1113
Vec :: new ( ) ,
1114
1114
)
1115
1115
}
@@ -1282,7 +1282,7 @@ impl<'tcx> Clean<'tcx, Item> for ty::AssocItem {
1282
1282
1283
1283
if self . defaultness . has_value ( ) {
1284
1284
AssocTypeItem (
1285
- Typedef {
1285
+ Box :: new ( Typedef {
1286
1286
type_ : clean_middle_ty (
1287
1287
tcx. type_of ( self . def_id ) ,
1288
1288
cx,
@@ -1291,7 +1291,7 @@ impl<'tcx> Clean<'tcx, Item> for ty::AssocItem {
1291
1291
generics,
1292
1292
// FIXME: should we obtain the Type from HIR and pass it on here?
1293
1293
item_type : None ,
1294
- } ,
1294
+ } ) ,
1295
1295
bounds,
1296
1296
)
1297
1297
} else {
@@ -1300,11 +1300,11 @@ impl<'tcx> Clean<'tcx, Item> for ty::AssocItem {
1300
1300
} else {
1301
1301
// FIXME: when could this happen? Associated items in inherent impls?
1302
1302
AssocTypeItem (
1303
- Typedef {
1303
+ Box :: new ( Typedef {
1304
1304
type_ : clean_middle_ty ( tcx. type_of ( self . def_id ) , cx, Some ( self . def_id ) ) ,
1305
1305
generics : Generics { params : Vec :: new ( ) , where_predicates : Vec :: new ( ) } ,
1306
1306
item_type : None ,
1307
- } ,
1307
+ } ) ,
1308
1308
Vec :: new ( ) ,
1309
1309
)
1310
1310
}
@@ -1949,11 +1949,11 @@ fn clean_maybe_renamed_item<'tcx>(
1949
1949
ItemKind :: TyAlias ( hir_ty, generics) => {
1950
1950
let rustdoc_ty = clean_ty ( hir_ty, cx) ;
1951
1951
let ty = clean_middle_ty ( hir_ty_to_ty ( cx. tcx , hir_ty) , cx, None ) ;
1952
- TypedefItem ( Typedef {
1952
+ TypedefItem ( Box :: new ( Typedef {
1953
1953
type_ : rustdoc_ty,
1954
1954
generics : generics. clean ( cx) ,
1955
1955
item_type : Some ( ty) ,
1956
- } )
1956
+ } ) )
1957
1957
}
1958
1958
ItemKind :: Enum ( ref def, generics) => EnumItem ( Enum {
1959
1959
variants : def. variants . iter ( ) . map ( |v| v. clean ( cx) ) . collect ( ) ,
@@ -2041,7 +2041,7 @@ fn clean_impl<'tcx>(
2041
2041
_ => None ,
2042
2042
} ) ;
2043
2043
let mut make_item = |trait_ : Option < Path > , for_ : Type , items : Vec < Item > | {
2044
- let kind = ImplItem ( Impl {
2044
+ let kind = ImplItem ( Box :: new ( Impl {
2045
2045
unsafety : impl_. unsafety ,
2046
2046
generics : impl_. generics . clean ( cx) ,
2047
2047
trait_,
@@ -2053,7 +2053,7 @@ fn clean_impl<'tcx>(
2053
2053
} else {
2054
2054
ImplKind :: Normal
2055
2055
} ,
2056
- } ) ;
2056
+ } ) ) ;
2057
2057
Item :: from_hir_id_and_parts ( hir_id, None , kind, cx)
2058
2058
} ;
2059
2059
if let Some ( type_alias) = type_alias {
0 commit comments