Auto merge of #112032 - sladyn98:migrate-item-primitive, r=GuillaumeGomez
Migrate `item_primitive` to Askama This PR migrates `item_primitive` to Askama Refers https://github.com/rust-lang/rust/issues/108868
This commit is contained in:
commit
2f5e6bb817
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user