rustdoc: stop treating everything in a trait item as a method#105629
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 13, 2022
Merged
rustdoc: stop treating everything in a trait item as a method#105629bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
(rustbot has picked a reviewer for you, use r? to override) |
| if toggled { | ||
| write!(w, "<details class=\"rustdoc-toggle method-toggle\" open><summary>"); | ||
| let method_toggle_class = if item_type.is_method() { " method-toggle" } else { "" }; | ||
| write!(w, "<details class=\"rustdoc-toggle{method_toggle_class}\" open><summary>"); |
Member
There was a problem hiding this comment.
Actually: why do we have both rustdoc-toggle and method-toggle?
Contributor
Author
There was a problem hiding this comment.
The setting "Auto-hide item methods' documentation" treats it special:
rust/src/librustdoc/html/static/js/main.js
Lines 688 to 690 in 37d7de3
Member
There was a problem hiding this comment.
Oh I see. Maybe we should extend this setting to all items which have docs. To be discussed later on I suppose.
GuillaumeGomez
approved these changes
Dec 12, 2022
Member
|
Thanks! @bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 13, 2022
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#104864 (Account for item-local in inner scope for E0425) - rust-lang#105332 (Point out the type of associated types in every method call of iterator chains) - rust-lang#105620 (Remove unnecessary uses of `clone`) - rust-lang#105625 (minor code cleanups) - rust-lang#105629 (rustdoc: stop treating everything in a trait item as a method) - rust-lang#105636 (Add check for local-storage value when changing "display line numbers" settings) - rust-lang#105639 (rustdoc: remove `type="text/css" from stylesheet links) - rust-lang#105640 (Adjust miri to still be optional) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was added in 0b9b4b7 to fix the spacing on trait pages, but stopped being needed because 791f04e stopped styling method-toggle. By only putting the method-toggle class on actual methods, the JS setting does the right thing.