-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix sub-variant doc display #55191
Fix sub-variant doc display #55191
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
8bc8e63
to
9b1e34a
Compare
cc @RalfJung I'm building a local copy to check it out myself, but i'm curious what this looks like if one of these sub-fields has docs of its own, or an unstable banner, like in the original issue. |
Personal testing with this branch: /// that's some enum, all right
#[unstable(feature="asdf", issue="0")]
pub enum SomeEnum {
Asdf,
/// we got some variant here, i guess
SomeVariant {
/// it's one field
one: usize,
/// it's two field
two: usize,
},
Qwop,
Girp,
} The stability banners seem to overlap the field definitions? Without the stability banners, it does look much better: |
Good catch! I'll fix the stability banner *soon*. |
It also looks odd to have to expand/collapse toggles here, one for the comment and one for the fields. Shouldn't that be just one? Also, the horizontal line below "Fields of SomeVariant" extends too far to the left; makes it look like it encompasses also "Qwop" and "Girp". |
c8b009e
to
4d4aacb
Compare
Fixed. @RalfJung I also moved the line more to the left. |
To the right, you mean? |
To the right indeed. 😆 |
It does. :) I still don't understand why we have two expand/collapse trees below |
The first However, you do bring up a good point - the section-marker that you can use to grab the anchor for the sub-fields is impossible to reach now. The marker appears all the way in the left gutter, and it goes away when you mouse over the space between the field name and the section marker. |
Ah indeed. I'll fix it as well. |
4d4aacb
to
498ca08
Compare
Fixed as well. |
Much better, thanks! @RalfJung Just to demonstrate the "two folds" thing, here's the same docs with a couple paragraphs of dummy text added. See how the extra text separates the two now: There is something to be said about our habit of putting folding containers everywhere, but that discussion should probably happen elsewhere, maybe in its own issue or as a conversation on Discord or IRC first. For now, i think this PR is a good improvement for the problem it sets out to solve. @bors r+ |
📌 Commit 498ca085201ca356666660e865ec49d72ba690ea has been approved by |
☔ The latest upstream changes (presumably #55382) made this pull request unmergeable. Please resolve the merge conflicts. |
498ca08
to
2fd378b
Compare
@bors: r=QuietMisdreavus |
📌 Commit 2fd378b has been approved by |
⌛ Testing commit 2fd378b with merge 89463a0598677a766fb74f57e0cbb4ca1e3b91c9... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
…uietMisdreavus Fix sub-variant doc display Fixes rust-lang#54758. <img width="1440" alt="screen shot 2018-10-19 at 01 34 11" src="https://user-images.githubusercontent.com/3050060/47189939-43481d00-d33f-11e8-868f-cf479fc79e62.png"> r? @QuietMisdreavus
Rollup of 11 pull requests Successful merges: - #55148 (Implement FromStr for PathBuf) - #55185 (path suggestions in Rust 2018 should point out the change in semantics) - #55191 (Fix sub-variant doc display) - #55199 (Impl items have generics) - #55244 (Don't rerun MIR passes when inlining) - #55252 (Add MaybeUninit::new) - #55257 (Allow extern statics with an extern type) - #55389 (Remove unnecessary mut in iterator.find_map documentation example, R…) - #55406 (Update string.rs) - #55412 (Fix an ICE in the min_const_fn analysis) - #55421 (Add ManuallyDrop::take)
Fixes #54758.
r? @QuietMisdreavus