-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't hide fields of enum struct variants #87332
Conversation
Some changes occurred in HTML/CSS/JS. |
(rust-highfive has picked a reviewer for you, use r? to override) |
0134918
to
9f724ba
Compare
This comment has been minimized.
This comment has been minimized.
9f724ba
to
09b9475
Compare
@@ -62,8 +62,7 @@ pub struct PrivStruct { | |||
} | |||
|
|||
// @has 'toggle_item_contents/enum.Enum.html' | |||
// @count - '//details[@class="rustdoc-toggle type-contents-toggle"]' 1 | |||
// @has - '//details[@class="rustdoc-toggle type-contents-toggle"]' 'Show fields' | |||
// @!has - '//details[@class="rustdoc-toggle type-contents-toggle"]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also check the "DOM path" please? !has
doesn't cover changes, only that something doesn't exist after all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this current test more general than checking a specific DOM path? I feel a bit confused about what you'd like me to change the test to. Could you give an example of what you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that the <details>
tag was wrapping another tag, but this is not the case. I really don't like that but I guess we can't do better.
This comment has been minimized.
This comment has been minimized.
09b9475
to
cb9c328
Compare
This comment has been minimized.
This comment has been minimized.
* The toggle adds visual clutter * It's easy to miss that there are fields * Tuple variant fields are always shown, so it is inconsistent to hide struct variant fields * It's annoying to have to click the toggle every time
cb9c328
to
97623bf
Compare
Thanks! @bors: r+ |
📌 Commit 97623bf has been approved by |
…meGomez Don't hide fields of enum struct variants * The toggle adds visual clutter * It's easy to miss that there are fields * Tuple variant fields are always shown, so it is inconsistent to hide struct variant fields * It's annoying to have to click the toggle every time
Rollup of 8 pull requests Successful merges: - rust-lang#87034 (DOC: fix hypothetical Rust code in `step_by()` docstring) - rust-lang#87298 (memorialize Anna Harren in the bastion of the turbofish) - rust-lang#87332 (Don't hide fields of enum struct variants) - rust-lang#87362 (Make `x.py d` an alias for `x.py doc`) - rust-lang#87372 (Move calls to test_main into one function) - rust-lang#87373 (Extend HIR WF checking to fields) - rust-lang#87376 (Change rustdoc logo to use the full container size) - rust-lang#87383 (Add regression tests for the impl_trait_in_bindings ICEs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
struct variant fields