diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-10-23 22:18:33 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-10-29 14:25:15 +0200 |
| commit | 3398877858b28862854097bd33a4b9bbadcd79af (patch) | |
| tree | d63c358ae8320636328a244549295bc9c9de27b5 | |
| parent | 0c38f31bf23506ad33bbd922ea6095f1010712df (diff) | |
| download | rust-3398877858b28862854097bd33a4b9bbadcd79af.tar.gz rust-3398877858b28862854097bd33a4b9bbadcd79af.zip | |
Remove the Rc wrapping of deref_id_map
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index db718fbe673..f7bfd7add29 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -56,7 +56,7 @@ crate struct Context<'tcx> { pub(super) render_redirect_pages: bool, /// Tracks section IDs for `Deref` targets so they match in both the main /// body and the sidebar. - pub(super) deref_id_map: Rc<RefCell<FxHashMap<DefId, String>>>, + pub(super) deref_id_map: RefCell<FxHashMap<DefId, String>>, /// The map used to ensure all generated 'id=' attributes are unique. pub(super) id_map: RefCell<IdMap>, /// Shared mutable state. @@ -73,7 +73,7 @@ crate struct Context<'tcx> { // `Context` is cloned a lot, so we don't want the size to grow unexpectedly. #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] -rustc_data_structures::static_assert_size!(Context<'_>, 112); +rustc_data_structures::static_assert_size!(Context<'_>, 144); /// Shared mutable state used in [`Context`] and elsewhere. crate struct SharedContext<'tcx> { @@ -516,7 +516,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { dst, render_redirect_pages: false, id_map: RefCell::new(id_map), - deref_id_map: Rc::new(RefCell::new(FxHashMap::default())), + deref_id_map: RefCell::new(FxHashMap::default()), shared: Rc::new(scx), include_sources, }; @@ -540,7 +540,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { current: self.current.clone(), dst: self.dst.clone(), render_redirect_pages: self.render_redirect_pages, - deref_id_map: Rc::new(RefCell::new(FxHashMap::default())), + deref_id_map: RefCell::new(FxHashMap::default()), id_map: RefCell::new(IdMap::new()), shared: Rc::clone(&self.shared), include_sources: self.include_sources, |
