about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-11-12 22:36:49 -0800
committerGitHub <noreply@github.com>2016-11-12 22:36:49 -0800
commitb6b98eaa40d2c81890cbeb31258aadb238f07279 (patch)
treebee0add735ab2d3c38542765d58f9edd1e5cdaea /src/rustllvm/RustWrapper.cpp
parent8c2b0e6347064da85ef776832bc94f4fa0d152e4 (diff)
parentfff921672f8e679c42d0659c475ee57fddac13b6 (diff)
downloadrust-b6b98eaa40d2c81890cbeb31258aadb238f07279.tar.gz
rust-b6b98eaa40d2c81890cbeb31258aadb238f07279.zip
Auto merge of #37728 - QuietMisdreavus:rustdoc-enum-struct, r=GuillaumeGomez
rustdoc: fold fields for enum struct variants into a docblock

Per discussion in #37500, this PR updates the enum rendering code to wrap variants with named struct fields in a `docblock` span that is hidden automatically upon load of the page. This gives struct variant fields a clean separation from other enum variants, giving a boost to the readability of such documentation. Preview output is available [on the issue page](https://github.com/rust-lang/rust/issues/37500#issuecomment-260069269), but for the sake of completeness I'll include the images here again.

![rustdoc struct enum variant 4 part 1](https://cloud.githubusercontent.com/assets/5217170/20231925/96160b7e-a82a-11e6-945b-bbba95c5e4bc.PNG)

When you initially load the page, there's a line under variants with struct fields letting you know you can click to expand the listing.

![rustdoc struct enum variant 4 part 2](https://cloud.githubusercontent.com/assets/3050060/20232067/1dc63266-a866-11e6-9555-8fb1c8afdcec.png)

If you click to expand, the header and table unfold into a nicely-indented listing.

If you want to take a look in your own browser and screen size, [I've got this version hosted on my server](https://shiva.icesoldier.me/doctest/doctest/enum.OldTopicRemoval.html).

Fixes #37500

r? @GuillaumeGomez
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions