Rollup merge of #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 #85923. This modifies the approach suggested in #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`
This commit is contained in:
commit
b5c3ef66e6
3 changed files with 14 additions and 14 deletions
5
src/test/rustdoc-gui/toggled-open-implementations.goml
Normal file
5
src/test/rustdoc-gui/toggled-open-implementations.goml
Normal file
|
|
@ -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", "")
|
||||
Loading…
Add table
Add a link
Reference in a new issue