@@ -53,10 +53,10 @@ crate struct Context<'tcx> {
53
53
/// publicly reused items to redirect to the right location.
54
54
pub ( super ) render_redirect_pages : bool ,
55
55
/// The map used to ensure all generated 'id=' attributes are unique.
56
- pub ( super ) id_map : RefCell < IdMap > ,
56
+ pub ( super ) id_map : Box < RefCell < IdMap > > ,
57
57
/// Tracks section IDs for `Deref` targets so they match in both the main
58
58
/// body and the sidebar.
59
- pub ( super ) deref_id_map : RefCell < FxHashMap < DefId , String > > ,
59
+ pub ( super ) deref_id_map : Box < RefCell < FxHashMap < DefId , String > > > ,
60
60
/// Shared mutable state.
61
61
///
62
62
/// Issue for improving the situation: [#82381][]
@@ -77,7 +77,7 @@ crate struct Context<'tcx> {
77
77
78
78
// `Context` is cloned a lot, so we don't want the size to grow unexpectedly.
79
79
#[ cfg( target_arch = "x86_64" ) ]
80
- rustc_data_structures:: static_assert_size!( Context <' _>, 152 ) ;
80
+ rustc_data_structures:: static_assert_size!( Context <' _>, 88 ) ;
81
81
82
82
impl < ' tcx > Context < ' tcx > {
83
83
pub ( super ) fn path ( & self , filename : & str ) -> PathBuf {
@@ -421,8 +421,8 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
421
421
current : Vec :: new ( ) ,
422
422
dst,
423
423
render_redirect_pages : false ,
424
- id_map : RefCell :: new ( id_map) ,
425
- deref_id_map : RefCell :: new ( FxHashMap :: default ( ) ) ,
424
+ id_map : Box :: new ( RefCell :: new ( id_map) ) ,
425
+ deref_id_map : Box :: new ( RefCell :: new ( FxHashMap :: default ( ) ) ) ,
426
426
shared : Rc :: new ( scx) ,
427
427
cache : Rc :: new ( cache) ,
428
428
} ;
0 commit comments