diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs
index fc6f51e8272ae..4cab2d6425736 100644
--- a/src/librustdoc/html/render/context.rs
+++ b/src/librustdoc/html/render/context.rs
@@ -231,7 +231,7 @@ impl<'tcx> Context<'tcx> {
rust_logo: has_doc_flag(self.tcx(), LOCAL_CRATE.as_def_id(), sym::rust_logo),
};
let mut page_buffer = Buffer::html();
- print_item(self, it, &mut page_buffer, &page);
+ print_item(self, it, &mut page_buffer);
layout::render(
&clone_shared.layout,
&page,
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index befb27f9320d3..168db5c0948ce 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -31,11 +31,10 @@ use crate::html::format::{
display_fn, join_with_double_colon, print_abi_with_space, print_constness_with_space,
print_where_clause, visibility_print_with_space, Buffer, Ending, PrintWithSpace,
};
-use crate::html::layout::Page;
+use crate::html::highlight;
use crate::html::markdown::{HeadingOffset, MarkdownSummaryLine};
use crate::html::render::{document_full, document_item_info};
use crate::html::url_parts_builder::UrlPartsBuilder;
-use crate::html::{highlight, static_files};
use askama::Template;
use itertools::Itertools;
@@ -157,8 +156,6 @@ struct PathComponent {
#[derive(Template)]
#[template(path = "print_item.html")]
struct ItemVars<'a> {
- static_root_path: &'a str,
- clipboard_svg: &'static static_files::StaticFile,
typ: &'a str,
name: &'a str,
item_type: &'a str,
@@ -178,12 +175,7 @@ fn print_where_clause_and_check<'a, 'tcx: 'a>(
len_before != buffer.len()
}
-pub(super) fn print_item(
- cx: &mut Context<'_>,
- item: &clean::Item,
- buf: &mut Buffer,
- page: &Page<'_>,
-) {
+pub(super) fn print_item(cx: &mut Context<'_>, item: &clean::Item, buf: &mut Buffer) {
debug_assert!(!item.is_stripped());
let typ = match *item.kind {
clean::ModuleItem(_) => {
@@ -252,8 +244,6 @@ pub(super) fn print_item(
};
let item_vars = ItemVars {
- static_root_path: &page.get_static_root_path(),
- clipboard_svg: &static_files::STATIC_FILES.clipboard_svg,
typ,
name: item.name.as_ref().unwrap().as_str(),
item_type: &item.type_().to_string(),
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 0bb073b1ceac0..e9c687b42fadc 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1603,6 +1603,16 @@ a.tooltip:hover::after {
border-color: var(--settings-button-border-focus);
}
+#settings-menu > a {
+ line-height: 0;
+ font-size: 0;
+}
+#settings-menu > a:before {
+ content: url('wheel-63255fc4502dca9a.svg');
+ width: 22px;
+ height: 22px;
+}
+
#sidebar-button > a:before {
content: url('data:image/svg+xml,