diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 4322e244834..bd1c17185ea 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -17,8 +17,8 @@ use rustc_span::symbol::sym; use super::cache::{build_index, ExternalLocation}; use super::print_item::{full_path, item_path, print_item}; use super::{ - make_item_keywords, print_sidebar, settings, write_shared, AllTypes, NameDoc, SharedContext, - StylePath, BASIC_KEYWORDS, CURRENT_DEPTH, INITIAL_IDS, + print_sidebar, settings, AllTypes, NameDoc, SharedContext, StylePath, BASIC_KEYWORDS, + CURRENT_DEPTH, INITIAL_IDS, }; use crate::clean::{self, AttributesExt}; @@ -610,3 +610,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { &self.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 2a13d190318..fc184bd4dea 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -2924,9 +2924,6 @@ fn sidebar_foreign_type(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item) { crate const BASIC_KEYWORDS: &str = "rust, rustlang, rust-lang"; -fn make_item_keywords(it: &clean::Item) -> String { - format!("{}, {}", BASIC_KEYWORDS, it.name.as_ref().unwrap()) -} /// Returns a list of all paths used in the type. /// This is used to help deduplicate imported impls