summary refs log tree commit diff
path: root/src/librustdoc/html/render/context.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-03 20:56:34 +0000
committerbors <bors@rust-lang.org>2021-05-03 20:56:34 +0000
commit88f19c6dab716c6281af7602e30f413e809c5974 (patch)
treef7af4b32537043e9dfbdd884f811ee8fe0122d90 /src/librustdoc/html/render/context.rs
parent9a1dfd2dc5c42a2ee84b4606aa08cdadf8c0ee87 (diff)
parent47c7b9c5788055ddbbb59d0d1fc909af7b48668d (diff)
downloadrust-1.52.0.tar.gz
rust-1.52.0.zip
Auto merge of #84864 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum 1.52.0
[stable] 1.52.0 release

This includes the release notes (#84183) as well as cherry-picked commits from:

* [beta] revert PR #77885 #84710
* [beta] remove assert_matches #84759
* Revert PR 81473 to resolve (on beta) issues 81626 and 81658. #83171
* [beta] rustdoc revert deref recur #84868
*  Fix ICE of for-loop mut borrowck where no suggestions are available #83401

Additionally in "fresh work" we're also:

* reverting: directly expose copy and copy_nonoverlapping intrinsics #81238 to avoid https://github.com/rust-lang/rust/issues/84297 on 1.52
Diffstat (limited to 'src/librustdoc/html/render/context.rs')
-rw-r--r--src/librustdoc/html/render/context.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs
index 864fbccbcc4..1d90122af15 100644
--- a/src/librustdoc/html/render/context.rs
+++ b/src/librustdoc/html/render/context.rs
@@ -5,8 +5,7 @@ use std::path::PathBuf;
 use std::rc::Rc;
 use std::sync::mpsc::channel;
 
-use rustc_data_structures::fx::FxHashMap;
-use rustc_hir::def_id::{DefId, LOCAL_CRATE};
+use rustc_hir::def_id::{LOCAL_CRATE};
 use rustc_middle::ty::TyCtxt;
 use rustc_session::Session;
 use rustc_span::edition::Edition;
@@ -53,9 +52,6 @@ crate struct Context<'tcx> {
     pub(super) render_redirect_pages: bool,
     /// The map used to ensure all generated 'id=' attributes are unique.
     pub(super) id_map: RefCell<IdMap>,
-    /// Tracks section IDs for `Deref` targets so they match in both the main
-    /// body and the sidebar.
-    pub(super) deref_id_map: RefCell<FxHashMap<DefId, String>>,
     /// Shared mutable state.
     ///
     /// Issue for improving the situation: [#82381][]
@@ -76,7 +72,7 @@ crate struct Context<'tcx> {
 
 // `Context` is cloned a lot, so we don't want the size to grow unexpectedly.
 #[cfg(target_arch = "x86_64")]
-rustc_data_structures::static_assert_size!(Context<'_>, 152);
+rustc_data_structures::static_assert_size!(Context<'_>, 112);
 
 impl<'tcx> Context<'tcx> {
     pub(super) fn path(&self, filename: &str) -> PathBuf {
@@ -416,7 +412,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
             dst,
             render_redirect_pages: false,
             id_map: RefCell::new(id_map),
-            deref_id_map: RefCell::new(FxHashMap::default()),
             shared: Rc::new(scx),
             cache: Rc::new(cache),
         };
@@ -439,7 +434,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
             dst: self.dst.clone(),
             render_redirect_pages: self.render_redirect_pages,
             id_map: RefCell::new(id_map),
-            deref_id_map: RefCell::new(FxHashMap::default()),
             shared: Rc::clone(&self.shared),
             cache: Rc::clone(&self.cache),
         }