forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
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#86260 - jsha:expand-methods, r=GuillaumeGomez
Open trait implementations' toggles by default. This makes it possible to use Ctrl-F to find methods defined in traits. As discussed in rust-lang#85923. This modifies the approach suggested in rust-lang#40363, but still achieves the goal of skimmability. For new users who aren't familiar with all the traits, their methods are readily visible and searchable. For experienced users who prefer to skim the list of all traits, there are two options: the "collapse all" shortcut, and the "auto hide trait implementations" setting. Demo https://hoffman-andrews.com/rust/expand-methods/std/string/struct.String.html#trait-implementations r? `@GuillaumeGomez`
- Loading branch information
Showing
3 changed files
with
14 additions
and
14 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// This tests that the "implementations" section on struct/enum pages | ||
// has all the implementations toggled open by default, so users can | ||
// find method names in those implementations with Ctrl-F. | ||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html | ||
assert: (".rustdoc-toggle.implementors-toggle", "open", "") |