-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #102027 - notriddle:notriddle/docblock-item-decl, r=G…
…uillaumeGomez rustdoc: remove `docblock` class from `item-decl` This class was originally added in 73b97c7 to support hiding and showing the item, because `main.js` went through all `docblock` elements in the DOM and added toggles to them. https://github.com/rust-lang/rust/blob/73b97c7e7c9cfac4dfa4804654b1db6ab687b589/src/librustdoc/html/static/main.js#L1856-L1867 The `item-decl` is no longer auto-hidden since c96f86d removed it. `item-decl` used to be called `type-decl`: that name was changed in 8b7a2dd. The `docblock` class is no longer used for implementing toggles, since rustdoc switched to using `<details>` elements. Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-item-decl/rustdoc/clean/types/enum.Type.html
- Loading branch information
Showing
27 changed files
with
87 additions
and
90 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// This test ensures that the docblock elements have the appropriate left margin. | ||
goto: file://|DOC_PATH|/test_docs/fn.foo.html | ||
// The top docblock elements shouldn't have left margin... | ||
assert-css: ("#main-content .docblock.item-decl", {"margin-left": "0px"}) | ||
assert-css: ("#main-content .item-decl", {"margin-left": "0px"}) | ||
// ... but all the others should! | ||
assert-css: ("#main-content .docblock:not(.item-decl)", {"margin-left": "24px"}) | ||
assert-css: ("#main-content .docblock", {"margin-left": "24px"}) |
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has 'foo/fn.f.html' | ||
// @has - //*[@'class="docblock item-decl"]' '#[export_name = "f"] pub fn f()' | ||
// @has - //*[@'class="item-decl"]' '#[export_name = "f"] pub fn f()' | ||
#[export_name = "\ | ||
f"] | ||
pub fn f() {} |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has 'foo/constant.HOUR_IN_SECONDS.html' | ||
// @has - '//*[@class="docblock item-decl"]//code' 'pub const HOUR_IN_SECONDS: u64 = _; // 3_600u64' | ||
// @has - '//*[@class="item-decl"]//code' 'pub const HOUR_IN_SECONDS: u64 = _; // 3_600u64' | ||
pub const HOUR_IN_SECONDS: u64 = 60 * 60; | ||
|
||
// @has 'foo/constant.NEGATIVE.html' | ||
// @has - '//*[@class="docblock item-decl"]//code' 'pub const NEGATIVE: i64 = _; // -3_600i64' | ||
// @has - '//*[@class="item-decl"]//code' 'pub const NEGATIVE: i64 = _; // -3_600i64' | ||
pub const NEGATIVE: i64 = -60 * 60; |
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
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
Oops, something went wrong.