]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #33867 - oli-obk:rustdoc_variant_types, r=GuillaumeGomez
authorManish Goregaokar <manishsmail@gmail.com>
Mon, 30 May 2016 15:05:46 +0000 (20:35 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Mon, 30 May 2016 15:05:46 +0000 (20:35 +0530)
print enum variant fields in docs

Right now we are repeating enum variants at the top, because the fields aren't shown with the actual docs. It's very annoying to have to scroll up and down to have both docs and field info. For struct variants we already list the fields.

enum docs look like this after this PR:

![screenshot from 2016-05-25 14-02-42](https://cloud.githubusercontent.com/assets/332036/15539231/84b018cc-2281-11e6-9666-1063655931f4.png)

There are degenerate cases for enum tuple variants with lots of fields:

![screenshot from 2016-05-25 14-01-00](https://cloud.githubusercontent.com/assets/332036/15539260/91e537ca-2281-11e6-8bf1-a3d6b2e78f65.png)

I was thinking that we could move the docs below the variant (slightly indented) or list the variant fields vertically instead of horizontally

r? @steveklabnik


Trivial merge