File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ impl Clean<GenericParamDef> for ty::GenericParamDef {
430
430
self . name ,
431
431
GenericParamDefKind :: Const {
432
432
did : self . def_id ,
433
- ty : cx. tcx . type_of ( self . def_id ) . clean ( cx) ,
433
+ ty : Box :: new ( cx. tcx . type_of ( self . def_id ) . clean ( cx) ) ,
434
434
default : match has_default {
435
435
true => Some ( Box :: new ( cx. tcx . const_param_default ( self . def_id ) . to_string ( ) ) ) ,
436
436
false => None ,
@@ -470,7 +470,7 @@ impl Clean<GenericParamDef> for hir::GenericParam<'_> {
470
470
self . name . ident ( ) . name ,
471
471
GenericParamDefKind :: Const {
472
472
did : cx. tcx . hir ( ) . local_def_id ( self . hir_id ) . to_def_id ( ) ,
473
- ty : ty. clean ( cx) ,
473
+ ty : Box :: new ( ty. clean ( cx) ) ,
474
474
default : default. map ( |ct| {
475
475
let def_id = cx. tcx . hir ( ) . local_def_id ( ct. hir_id ) ;
476
476
Box :: new ( ty:: Const :: from_anon_const ( cx. tcx , def_id) . to_string ( ) )
Original file line number Diff line number Diff line change @@ -1224,7 +1224,7 @@ crate enum GenericParamDefKind {
1224
1224
} ,
1225
1225
Const {
1226
1226
did : DefId ,
1227
- ty : Type ,
1227
+ ty : Box < Type > ,
1228
1228
default : Option < Box < String > > ,
1229
1229
} ,
1230
1230
}
@@ -1240,7 +1240,7 @@ impl GenericParamDefKind {
1240
1240
crate fn get_type ( & self ) -> Option < Type > {
1241
1241
match self {
1242
1242
GenericParamDefKind :: Type { default, .. } => default. as_deref ( ) . cloned ( ) ,
1243
- GenericParamDefKind :: Const { ty, .. } => Some ( ty . clone ( ) ) ,
1243
+ GenericParamDefKind :: Const { ty, .. } => Some ( ( & * * ty ) . clone ( ) ) ,
1244
1244
GenericParamDefKind :: Lifetime { .. } => None ,
1245
1245
}
1246
1246
}
@@ -1254,7 +1254,7 @@ crate struct GenericParamDef {
1254
1254
1255
1255
// `GenericParamDef` is used in many places. Make sure it doesn't unintentionally get bigger.
1256
1256
#[ cfg( all( target_arch = "x86_64" , target_pointer_width = "64" ) ) ]
1257
- rustc_data_structures:: static_assert_size!( GenericParamDef , 104 ) ;
1257
+ rustc_data_structures:: static_assert_size!( GenericParamDef , 56 ) ;
1258
1258
1259
1259
impl GenericParamDef {
1260
1260
crate fn is_synthetic_type_param ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ impl FromWithTcx<clean::GenericParamDefKind> for GenericParamDefKind {
333
333
default : default. map ( |x| ( * x) . into_tcx ( tcx) ) ,
334
334
} ,
335
335
Const { did : _, ty, default } => {
336
- GenericParamDefKind :: Const { ty : ty . into_tcx ( tcx) , default : default. map ( |x| * x) }
336
+ GenericParamDefKind :: Const { ty : ( * ty ) . into_tcx ( tcx) , default : default. map ( |x| * x) }
337
337
}
338
338
}
339
339
}
You can’t perform that action at this time.
0 commit comments