Auto merge of #112028 - fee1-dead-contrib:rollup-4xxzxd0, r=fee1-dead

Rollup of 2 pull requests

Successful merges:

 - #110081 (bump `thiserror` to use syn 2.0)
 - #112005 (Migrate `item_foreign_type` to Askama )

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2023-05-28 07:13:22 +00:00
commit ddad0576ca
2 changed files with 13 additions and 11 deletions

View File

@ -4981,22 +4981,22 @@ checksum = "aac81b6fd6beb5884b0cf3321b8117e6e5d47ecb6fc89f414cfdcca8b2fe2dd8"
[[package]]
name = "thiserror"
version = "1.0.38"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.38"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.102",
"syn 2.0.8",
]
[[package]]

View File

@ -1578,21 +1578,23 @@ fn item_static(w: &mut impl fmt::Write, cx: &mut Context<'_>, it: &clean::Item,
write!(w, "{}", document(cx, it, None, HeadingOffset::H2)).unwrap();
}
fn item_foreign_type(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
wrap_item(w, |w| {
w.write_str("extern {\n");
render_attributes_in_code(w, it, cx.tcx());
fn item_foreign_type(w: &mut impl fmt::Write, cx: &mut Context<'_>, it: &clean::Item) {
let mut buffer = Buffer::new();
wrap_item(&mut buffer, |buffer| {
buffer.write_str("extern {\n");
render_attributes_in_code(buffer, it, cx.tcx());
write!(
w,
buffer,
" {}type {};\n}}",
visibility_print_with_space(it.visibility(cx.tcx()), it.item_id, cx),
it.name.unwrap(),
);
});
write!(w, "{}", document(cx, it, None, HeadingOffset::H2));
write!(w, "{}{}", buffer.into_inner(), document(cx, it, None, HeadingOffset::H2)).unwrap();
write!(w, "{}", render_assoc_items(cx, it, it.item_id.expect_def_id(), AssocItemRender::All))
.unwrap();
}
fn item_keyword(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {