\
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index e139ac8581e72..711d3eb916390 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -59,7 +59,7 @@ struct ItemVars<'a> {
}
pub(super) fn print_item(
- cx: &Context<'_>,
+ cx: &mut Context<'_>,
templates: &tera::Tera,
item: &clean::Item,
buf: &mut Buffer,
@@ -133,12 +133,12 @@ pub(super) fn print_item(
};
let item_vars = ItemVars {
- page: page,
+ page,
static_root_path: page.get_static_root_path(),
- typ: typ,
+ typ,
name: &item.name.as_ref().unwrap().as_str(),
item_type: &item.type_().to_string(),
- path_components: path_components,
+ path_components,
stability_since_raw: &stability_since_raw,
src_href: src_href.as_deref(),
};
@@ -496,9 +496,9 @@ fn item_function(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, f: &clean::
unsafety = unsafety,
abi = abi,
name = name,
- generics = f.generics.print(cx),
- where_clause = print_where_clause(&f.generics, cx, 0, true),
- decl = f.decl.full_print(header_len, 0, f.header.asyncness, cx),
+ generics = f.generics.print(&*cx),
+ where_clause = print_where_clause(&f.generics, &*cx, 0, true),
+ decl = f.decl.full_print(header_len, 0, f.header.asyncness, &*cx),
notable_traits = notable_traits_decl(&f.decl, cx),
);
});
@@ -506,7 +506,7 @@ fn item_function(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, f: &clean::
document(w, cx, it, None, HeadingOffset::H2)
}
-fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Trait) {
+fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean::Trait) {
let bounds = bounds(&t.bounds, false, cx);
let types = t.items.iter().filter(|m| m.is_associated_type()).collect::
>();
let consts = t.items.iter().filter(|m| m.is_associated_const()).collect::>();
@@ -680,7 +680,7 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
write!(w, "", id);
write!(w, "
");
render_stability_since(w, m, t, cx.tcx());
- write_srclink(cx, m, w);
+ write_srclink(&mut (*cx), m, w);
write!(w, "
");
write!(w, "