Skip to content

Commit

Permalink
Auto merge of rust-lang#112032 - sladyn98:migrate-item-primitive, r=G…
Browse files Browse the repository at this point in the history
…uillaumeGomez

Migrate  `item_primitive` to Askama

This PR migrates `item_primitive` to Askama

Refers rust-lang#108868
  • Loading branch information
bors committed Jun 3, 2023
2 parents 1e17cef + c5e5d69 commit 2f5e6bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1457,11 +1457,11 @@ fn item_proc_macro(
write!(w, "{}{}", buffer.into_inner(), document(cx, it, None, HeadingOffset::H2)).unwrap();
}

fn item_primitive(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
fn item_primitive(w: &mut impl fmt::Write, cx: &mut Context<'_>, it: &clean::Item) {
let def_id = it.item_id.expect_def_id();
write!(w, "{}", document(cx, it, None, HeadingOffset::H2));
write!(w, "{}", document(cx, it, None, HeadingOffset::H2)).unwrap();
if it.name.map(|n| n.as_str() != "reference").unwrap_or(false) {
write!(w, "{}", render_assoc_items(cx, it, def_id, AssocItemRender::All));
write!(w, "{}", render_assoc_items(cx, it, def_id, AssocItemRender::All)).unwrap();
} else {
// We handle the "reference" primitive type on its own because we only want to list
// implementations on generic types.
Expand Down

0 comments on commit 2f5e6bb

Please sign in to comment.