about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas-Baron <nicholas.baron.ten@gmail.com>2021-02-13 23:03:07 -0800
committerNicholas-Baron <nicholas.baron.ten@gmail.com>2021-03-04 10:01:22 -0800
commit14983b9812e67a283587b651c0a14e1d4e1ab723 (patch)
tree1ba19fa6b5a0d0d878a7ab7c0c18234e98f4a731
parent6c7d7a6bf4b8a3a653d8cba0acf5b20b088aff2e (diff)
downloadrust-14983b9812e67a283587b651c0a14e1d4e1ab723.tar.gz
rust-14983b9812e67a283587b651c0a14e1d4e1ab723.zip
Moved the `make_item_keywords` function to `context.rs` as it is only used there
-rw-r--r--src/librustdoc/html/render/context.rs8
-rw-r--r--src/librustdoc/html/render/mod.rs3
2 files changed, 6 insertions, 5 deletions
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