diff options
| author | bors <bors@rust-lang.org> | 2021-04-04 17:48:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-04 17:48:41 +0000 |
| commit | 8ad6a443cfee83e1f7d29c9ec0de26143c54a617 (patch) | |
| tree | bb122b499c5baa9399d1ca9f05995ea414035e06 /src/librustdoc/html/render | |
| parent | 5b0ab79116ba3231f447bc7a67c16ce93ecca0a3 (diff) | |
| parent | b943ea8cdc677e4637ed25f0d4a2814b168aa97d (diff) | |
| download | rust-8ad6a443cfee83e1f7d29c9ec0de26143c54a617.tar.gz rust-8ad6a443cfee83e1f7d29c9ec0de26143c54a617.zip | |
Auto merge of #83855 - Dylan-DPC:rollup-oww62sh, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - #73945 (Add an unstable --json=unused-externs flag to print unused externs) - #81619 (Implement `SourceIterator` and `InPlaceIterable` for `ResultShunt`) - #82726 (BTree: move blocks around in node.rs) - #83521 (2229: Fix diagnostic issue when using FakeReads in closures) - #83532 (Fix compiletest on FreeBSD) - #83793 (rustdoc: highlight macros more efficiently) - #83809 (Remove unneeded INITIAL_IDS const) - #83827 (cleanup leak after test to make miri happy) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 7 | ||||
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 18 |
2 files changed, 2 insertions, 23 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 07c850a20a9..1a993f360a1 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -18,7 +18,7 @@ use super::print_item::{full_path, item_path, print_item}; use super::write_shared::write_shared; use super::{ print_sidebar, settings, AllTypes, NameDoc, SharedContext, StylePath, BASIC_KEYWORDS, - CURRENT_DEPTH, INITIAL_IDS, + CURRENT_DEPTH, }; use crate::clean::{self, AttributesExt}; @@ -423,14 +423,11 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { } fn make_child_renderer(&self) -> Self { - let mut id_map = IdMap::new(); - id_map.populate(&INITIAL_IDS); - Self { current: self.current.clone(), dst: self.dst.clone(), render_redirect_pages: self.render_redirect_pages, - id_map: RefCell::new(id_map), + id_map: RefCell::new(IdMap::new()), deref_id_map: RefCell::new(FxHashMap::default()), shared: Rc::clone(&self.shared), cache: Rc::clone(&self.cache), diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index a8a08fb23e0..7b656baa1b4 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -283,24 +283,6 @@ crate struct StylePath { thread_local!(crate static CURRENT_DEPTH: Cell<usize> = Cell::new(0)); -crate const INITIAL_IDS: [&'static str; 15] = [ - "main", - "search", - "help", - "TOC", - "render-detail", - "associated-types", - "associated-const", - "required-methods", - "provided-methods", - "implementors", - "synthetic-implementors", - "implementors-list", - "synthetic-implementors-list", - "methods", - "implementations", -]; - fn write_srclink(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer) { if let Some(l) = cx.src_href(item) { write!(buf, "<a class=\"srclink\" href=\"{}\" title=\"goto source code\">[src]</a>", l) |
