Skip to content

Commit b10e601

Browse files
authored
Rollup merge of #107476 - notriddle:notriddle/item-decl-3, r=GuillaumeGomez
rustdoc: remove unnecessary wrapper `div.item-decl` from HTML
2 parents 401564d + 7080f80 commit b10e601

File tree

74 files changed

+549
-590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+549
-590
lines changed

src/librustdoc/html/highlight.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ pub(crate) fn render_example_with_highlighting(
5858
write_footer(out, playground_button);
5959
}
6060

61-
/// Highlights `src` as a macro, returning the HTML output.
62-
pub(crate) fn render_macro_with_highlighting(src: &str, out: &mut Buffer) {
63-
write_header(out, "macro", None, Tooltip::None);
61+
/// Highlights `src` as an item-decl, returning the HTML output.
62+
pub(crate) fn render_item_decl_with_highlighting(src: &str, out: &mut Buffer) {
63+
write!(out, "<pre class=\"rust item-decl\">");
6464
write_code(out, src, None, None);
65-
write_footer(out, None);
65+
write!(out, "</pre>");
6666
}
6767

6868
/// Highlights `src` as a source code page, returning the HTML output.

0 commit comments

Comments
 (0)