diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-07-07 12:17:40 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-07 12:17:40 +0900 |
| commit | cbb40cd0f2157b93f6c7774d11bc9aa5a9882352 (patch) | |
| tree | a5c4633411f8ce8dd9ac9e1c05107184e10df39f | |
| parent | 7e95290caab37233eebc323351d353ecdb3ce782 (diff) | |
| parent | 8c2a37a04abd3a921ee315aa5e1b62f3c52570a7 (diff) | |
| download | rust-cbb40cd0f2157b93f6c7774d11bc9aa5a9882352.tar.gz rust-cbb40cd0f2157b93f6c7774d11bc9aa5a9882352.zip | |
Rollup merge of #86819 - GuillaumeGomez:cleanup-rustdoc-ids, r=jyn514
Clean up rustdoc IDs I cherry-picked the commit from https://github.com/rust-lang/rust/pull/86178. It adds missing rustdoc IDs (for the HTML) and remove unused ones. cc `@camelid` r? `@jyn514`
| -rw-r--r-- | src/librustdoc/html/markdown.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index bafb522f363..9fff508165a 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -1358,7 +1358,10 @@ pub struct IdMap { fn init_id_map() -> FxHashMap<String, usize> { let mut map = FxHashMap::default(); - // This is the list of IDs used by rustdoc templates. + // This is the list of IDs used in Javascript. + map.insert("help".to_owned(), 1); + // This is the list of IDs used in HTML generated in Rust (including the ones + // used in tera template files). map.insert("mainThemeStyle".to_owned(), 1); map.insert("themeStyle".to_owned(), 1); map.insert("theme-picker".to_owned(), 1); @@ -1375,14 +1378,14 @@ fn init_id_map() -> FxHashMap<String, usize> { map.insert("rustdoc-vars".to_owned(), 1); map.insert("sidebar-vars".to_owned(), 1); map.insert("copy-path".to_owned(), 1); - map.insert("help".to_owned(), 1); map.insert("TOC".to_owned(), 1); - map.insert("render-detail".to_owned(), 1); - // This is the list of IDs used by rustdoc sections. + // This is the list of IDs used by rustdoc sections (but still generated by + // rustdoc). map.insert("fields".to_owned(), 1); map.insert("variants".to_owned(), 1); map.insert("implementors-list".to_owned(), 1); map.insert("synthetic-implementors-list".to_owned(), 1); + map.insert("foreign-impls".to_owned(), 1); map.insert("implementations".to_owned(), 1); map.insert("trait-implementations".to_owned(), 1); map.insert("synthetic-implementations".to_owned(), 1); @@ -1393,6 +1396,10 @@ fn init_id_map() -> FxHashMap<String, usize> { map.insert("provided-methods".to_owned(), 1); map.insert("implementors".to_owned(), 1); map.insert("synthetic-implementors".to_owned(), 1); + map.insert("trait-implementations-list".to_owned(), 1); + map.insert("synthetic-implementations-list".to_owned(), 1); + map.insert("blanket-implementations-list".to_owned(), 1); + map.insert("deref-methods".to_owned(), 1); map } |
