diff options
| author | Michael Howell <michael@notriddle.com> | 2023-01-30 12:20:06 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-01-30 12:20:06 -0700 |
| commit | f5bac0c4c8b00eceaba627b4bf074a38f1971330 (patch) | |
| tree | 7108a7e19033361d39343d0693b3fc594a99c1de /src/librustdoc/html/render | |
| parent | 006ca9b14da1e0145844598b3d6a554c042c702a (diff) | |
| download | rust-f5bac0c4c8b00eceaba627b4bf074a38f1971330.tar.gz rust-f5bac0c4c8b00eceaba627b4bf074a38f1971330.zip | |
rustdoc: remove meta keywords from HTML
Discussed in <https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.60.3Cmeta.20name.3D.22keywords.22.3E.60>
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 9 | ||||
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/render/write_shared.rs | 3 |
3 files changed, 2 insertions, 12 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 15258a467a2..b59645ec2e2 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -18,7 +18,7 @@ use super::search_index::build_index; use super::write_shared::write_shared; use super::{ collect_spans_and_sources, print_sidebar, scrape_examples_help, sidebar_module_like, AllTypes, - LinkFromSrc, NameDoc, StylePath, BASIC_KEYWORDS, + LinkFromSrc, NameDoc, StylePath, }; use crate::clean::{self, types::ExternalLocation, ExternalCrate}; @@ -195,7 +195,6 @@ impl<'tcx> Context<'tcx> { self.shared.layout.krate ) }; - let keywords = make_item_keywords(it); let name; let tyname_s = if it.is_crate() { name = format!("{} crate", tyname); @@ -212,7 +211,6 @@ impl<'tcx> Context<'tcx> { static_root_path: clone_shared.static_root_path.as_deref(), title: &title, description: &desc, - keywords: &keywords, resource_suffix: &clone_shared.resource_suffix, }; let mut page_buffer = Buffer::html(); @@ -598,7 +596,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { root_path: "../", static_root_path: shared.static_root_path.as_deref(), description: "List of all items in this crate", - keywords: BASIC_KEYWORDS, resource_suffix: &shared.resource_suffix, }; let all = shared.all.replace(AllTypes::new()); @@ -828,7 +825,3 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { &self.shared.cache } } - -fn make_item_keywords(it: &clean::Item) -> String { - format!("{}, {}", BASIC_KEYWORDS, it.name.as_ref().unwrap()) -} diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index be6de231854..816a8f4e274 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -2743,8 +2743,6 @@ fn sidebar_foreign_type(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item) { } } -pub(crate) const BASIC_KEYWORDS: &str = "rust, rustlang, rust-lang"; - /// Returns a list of all paths used in the type. /// This is used to help deduplicate imported impls /// for reexported types. If any of the contained diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index bc8badad38e..6b71ecc24bd 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -11,7 +11,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use serde::ser::SerializeSeq; use serde::{Serialize, Serializer}; -use super::{collect_paths_for_type, ensure_trailing_slash, Context, BASIC_KEYWORDS}; +use super::{collect_paths_for_type, ensure_trailing_slash, Context}; use crate::clean::Crate; use crate::config::{EmitType, RenderOptions}; use crate::docfs::PathError; @@ -340,7 +340,6 @@ if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; root_path: "./", static_root_path: shared.static_root_path.as_deref(), description: "List of crates", - keywords: BASIC_KEYWORDS, resource_suffix: &shared.resource_suffix, }; |
