Skip to content

Commit 14983b9

Browse files
Moved the make_item_keywords function to context.rs as it is only used there
1 parent 6c7d7a6 commit 14983b9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/librustdoc/html/render/context.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use rustc_span::symbol::sym;
1717
use super::cache::{build_index, ExternalLocation};
1818
use super::print_item::{full_path, item_path, print_item};
1919
use super::{
20-
make_item_keywords, print_sidebar, settings, write_shared, AllTypes, NameDoc, SharedContext,
21-
StylePath, BASIC_KEYWORDS, CURRENT_DEPTH, INITIAL_IDS,
20+
print_sidebar, settings, AllTypes, NameDoc, SharedContext, StylePath, BASIC_KEYWORDS,
21+
CURRENT_DEPTH, INITIAL_IDS,
2222
};
2323

2424
use crate::clean::{self, AttributesExt};
@@ -610,3 +610,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
610610
&self.cache
611611
}
612612
}
613+
614+
fn make_item_keywords(it: &clean::Item) -> String {
615+
format!("{}, {}", BASIC_KEYWORDS, it.name.as_ref().unwrap())
616+
}

src/librustdoc/html/render/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2924,9 +2924,6 @@ fn sidebar_foreign_type(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item) {
29242924

29252925
crate const BASIC_KEYWORDS: &str = "rust, rustlang, rust-lang";
29262926

2927-
fn make_item_keywords(it: &clean::Item) -> String {
2928-
format!("{}, {}", BASIC_KEYWORDS, it.name.as_ref().unwrap())
2929-
}
29302927

29312928
/// Returns a list of all paths used in the type.
29322929
/// This is used to help deduplicate imported impls

0 commit comments

Comments
 (0)