Skip to content

Commit 91806e0

Browse files
Deduplicate "attributes" and "attribute macros" sections IDs
1 parent 76a8322 commit 91806e0

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

src/librustdoc/html/static/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ function preLoadCss(cssUrl) {
799799
block("foreigntype", "foreign-types", "Foreign Types");
800800
block("keyword", "keywords", "Keywords");
801801
block("attribute", "attributes", "Attributes");
802-
block("attr", "attributes", "Attribute Macros");
802+
block("attr", "attribute-macros", "Attribute Macros");
803803
block("derive", "derives", "Derive Macros");
804804
block("traitalias", "trait-aliases", "Trait Aliases");
805805
}

tests/rustdoc-gui/attr-macros.goml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ assert-count: ("#main-content a[href='macro.attr_macro.html']", 2)
2727
// First in the "Macros" section.
2828
assert-text: ("#macros + .item-table a[href='macro.attr_macro.html']", "attr_macro")
2929
// Then in the "Attribute Macros" section.
30-
assert-text: ("#attributes + .item-table a[href='macro.attr_macro.html']", "attr_macro")
30+
assert-text: ("#attribute-macros + .item-table a[href='macro.attr_macro.html']", "attr_macro")
3131

3232
// And finally we check it's correctly listed in the "all items" page.
3333
go-to: "file://" + |DOC_PATH| + "/test_docs/all.html"
@@ -36,4 +36,4 @@ assert-count: ("#main-content a[href='macro.attr_macro.html']", 2)
3636
// First in the "Macros" section.
3737
assert-text: ("#macros + .all-items a[href='macro.attr_macro.html']", "attr_macro")
3838
// Then in the "Attribute Macros" section.
39-
assert-text: ("#attributes + .all-items a[href='macro.attr_macro.html']", "attr_macro")
39+
assert-text: ("#attribute-macros + .all-items a[href='macro.attr_macro.html']", "attr_macro")

tests/rustdoc-gui/module-items-font.goml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,12 @@ assert-css: (
7474
"#attributes + .item-table dd",
7575
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
7676
)
77+
// attribute macros
78+
assert-css: (
79+
"#attribute-macros + .item-table dt a",
80+
{"font-family": '"Fira Sans", Arial, NanumBarunGothic, sans-serif'},
81+
)
82+
assert-css: (
83+
"#attribute-macros + .item-table dd",
84+
{"font-family": '"Source Serif 4", NanumBarunGothic, serif'},
85+
)

tests/rustdoc-gui/src/test_docs/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ macro_rules! a{ () => {}}
33
#[macro_export]
44
macro_rules! b{ () => {}}
55

6-
// An attribute bang macro.
6+
/// An attribute bang macro.
77
#[macro_export]
88
macro_rules! attr_macro {
99
attr() () => {};

0 commit comments

Comments
 (0)