Skip to content

Commit ddad057

Browse files
committed
Auto merge of rust-lang#112028 - fee1-dead-contrib:rollup-4xxzxd0, r=fee1-dead
Rollup of 2 pull requests Successful merges: - rust-lang#110081 (bump `thiserror` to use syn 2.0) - rust-lang#112005 (Migrate `item_foreign_type` to Askama ) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2560b80 + 5a19113 commit ddad057

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

Cargo.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -4981,22 +4981,22 @@ checksum = "aac81b6fd6beb5884b0cf3321b8117e6e5d47ecb6fc89f414cfdcca8b2fe2dd8"
49814981

49824982
[[package]]
49834983
name = "thiserror"
4984-
version = "1.0.38"
4984+
version = "1.0.40"
49854985
source = "registry+https://github.com/rust-lang/crates.io-index"
4986-
checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
4986+
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
49874987
dependencies = [
49884988
"thiserror-impl",
49894989
]
49904990

49914991
[[package]]
49924992
name = "thiserror-impl"
4993-
version = "1.0.38"
4993+
version = "1.0.40"
49944994
source = "registry+https://github.com/rust-lang/crates.io-index"
4995-
checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
4995+
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
49964996
dependencies = [
49974997
"proc-macro2",
49984998
"quote",
4999-
"syn 1.0.102",
4999+
"syn 2.0.8",
50005000
]
50015001

50025002
[[package]]

src/librustdoc/html/render/print_item.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -1578,21 +1578,23 @@ fn item_static(w: &mut impl fmt::Write, cx: &mut Context<'_>, it: &clean::Item,
15781578
write!(w, "{}", document(cx, it, None, HeadingOffset::H2)).unwrap();
15791579
}
15801580

1581-
fn item_foreign_type(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
1582-
wrap_item(w, |w| {
1583-
w.write_str("extern {\n");
1584-
render_attributes_in_code(w, it, cx.tcx());
1581+
fn item_foreign_type(w: &mut impl fmt::Write, cx: &mut Context<'_>, it: &clean::Item) {
1582+
let mut buffer = Buffer::new();
1583+
wrap_item(&mut buffer, |buffer| {
1584+
buffer.write_str("extern {\n");
1585+
render_attributes_in_code(buffer, it, cx.tcx());
15851586
write!(
1586-
w,
1587+
buffer,
15871588
" {}type {};\n}}",
15881589
visibility_print_with_space(it.visibility(cx.tcx()), it.item_id, cx),
15891590
it.name.unwrap(),
15901591
);
15911592
});
15921593

1593-
write!(w, "{}", document(cx, it, None, HeadingOffset::H2));
1594+
write!(w, "{}{}", buffer.into_inner(), document(cx, it, None, HeadingOffset::H2)).unwrap();
15941595

15951596
write!(w, "{}", render_assoc_items(cx, it, it.item_id.expect_def_id(), AssocItemRender::All))
1597+
.unwrap();
15961598
}
15971599

15981600
fn item_keyword(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {

0 commit comments

Comments
 (0)