forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#94002 - GuillaumeGomez:duplicated-sidebar-m…
…acro, r=notriddle rustdoc: Avoid duplicating macros in sidebar Fixes rust-lang#93912. cc `@jsha` (for the GUI test) r? `@camelid`
- Loading branch information
Showing
4 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// This test ensures that there is no macro duplicates in the sidebar. | ||
goto: file://|DOC_PATH|/test_docs/macro.a.html | ||
// Waiting for the elements in the sidebar to be rendered. | ||
wait-for: ".sidebar-elems .others .macro" | ||
// Check there is only one macro named "a" listed in the sidebar. | ||
assert-count: ( | ||
"//*[@class='sidebar-elems']//*[@class='others']/*[@class='block macro']//li/a[text()='a']", | ||
1, | ||
) | ||
// Check there is only one macro named "b" listed in the sidebar. | ||
assert-count: ( | ||
"//*[@class='sidebar-elems']//*[@class='others']/*[@class='block macro']//li/a[text()='b']", | ||
1, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#[macro_export] | ||
macro_rules! a{ () => {}} | ||
#[macro_export] | ||
macro_rules! b{ () => {}} |