Fixed tests
This commit is contained in:
parent
9078fd51d6
commit
df98e3e6ec
1 changed files with 9 additions and 4 deletions
|
@ -1542,10 +1542,12 @@ fn item_struct(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean
|
||||||
}
|
}
|
||||||
|
|
||||||
fn item_static(w: &mut impl fmt::Write, cx: &mut Context<'_>, it: &clean::Item, s: &clean::Static) {
|
fn item_static(w: &mut impl fmt::Write, cx: &mut Context<'_>, it: &clean::Item, s: &clean::Static) {
|
||||||
wrap_item(w, |w| {
|
|
||||||
render_attributes_in_code(w, it, cx.tcx());
|
let mut buffer = Buffer::new();
|
||||||
|
wrap_item(&mut buffer, |buffer| {
|
||||||
|
render_attributes_in_code(buffer, it, cx.tcx());
|
||||||
write!(
|
write!(
|
||||||
w,
|
buffer,
|
||||||
"{vis}static {mutability}{name}: {typ}",
|
"{vis}static {mutability}{name}: {typ}",
|
||||||
vis = visibility_print_with_space(it.visibility(cx.tcx()), it.item_id, cx),
|
vis = visibility_print_with_space(it.visibility(cx.tcx()), it.item_id, cx),
|
||||||
mutability = s.mutability.print_with_space(),
|
mutability = s.mutability.print_with_space(),
|
||||||
|
@ -1553,7 +1555,10 @@ fn item_static(w: &mut impl fmt::Write, cx: &mut Context<'_>, it: &clean::Item,
|
||||||
typ = s.type_.print(cx)
|
typ = s.type_.print(cx)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
write!(w, "{}", document(cx, it, None, HeadingOffset::H2))
|
|
||||||
|
write!(w, "{}", buffer.into_inner()).unwrap();
|
||||||
|
|
||||||
|
write!(w, "{}", document(cx, it, None, HeadingOffset::H2)).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn item_foreign_type(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
|
fn item_foreign_type(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue