Skip to content

Commit 3398877

Browse files
Remove the Rc wrapping of deref_id_map
1 parent 0c38f31 commit 3398877

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustdoc/html/render/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ crate struct Context<'tcx> {
5656
pub(super) render_redirect_pages: bool,
5757
/// Tracks section IDs for `Deref` targets so they match in both the main
5858
/// body and the sidebar.
59-
pub(super) deref_id_map: Rc<RefCell<FxHashMap<DefId, String>>>,
59+
pub(super) deref_id_map: RefCell<FxHashMap<DefId, String>>,
6060
/// The map used to ensure all generated 'id=' attributes are unique.
6161
pub(super) id_map: RefCell<IdMap>,
6262
/// Shared mutable state.
@@ -73,7 +73,7 @@ crate struct Context<'tcx> {
7373

7474
// `Context` is cloned a lot, so we don't want the size to grow unexpectedly.
7575
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
76-
rustc_data_structures::static_assert_size!(Context<'_>, 112);
76+
rustc_data_structures::static_assert_size!(Context<'_>, 144);
7777

7878
/// Shared mutable state used in [`Context`] and elsewhere.
7979
crate struct SharedContext<'tcx> {
@@ -516,7 +516,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
516516
dst,
517517
render_redirect_pages: false,
518518
id_map: RefCell::new(id_map),
519-
deref_id_map: Rc::new(RefCell::new(FxHashMap::default())),
519+
deref_id_map: RefCell::new(FxHashMap::default()),
520520
shared: Rc::new(scx),
521521
include_sources,
522522
};
@@ -540,7 +540,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
540540
current: self.current.clone(),
541541
dst: self.dst.clone(),
542542
render_redirect_pages: self.render_redirect_pages,
543-
deref_id_map: Rc::new(RefCell::new(FxHashMap::default())),
543+
deref_id_map: RefCell::new(FxHashMap::default()),
544544
id_map: RefCell::new(IdMap::new()),
545545
shared: Rc::clone(&self.shared),
546546
include_sources: self.include_sources,

0 commit comments

Comments
 (0)