Skip to content

rustdoc: Only the last enum variant / struct member is collapsable. #42674

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

Closed
kennytm opened this issue Jun 15, 2017 · 0 comments
Closed

rustdoc: Only the last enum variant / struct member is collapsable. #42674

kennytm opened this issue Jun 15, 2017 · 0 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@kennytm
Copy link
Member

kennytm commented Jun 15, 2017

Test case:

pub enum A {
    /// Long long long
    X,
    /// Long long long
    Y,
    /// Long long long
    Z,
}

pub struct B {
    /// Long long long
    pub x: u32,
    /// Long long long
    pub y: u32,
    /// Long long long
    pub z: u32,
}

Running rustdoc a.rs, it produces these webpages:

screenshot_2017-06-15 20 52 22_vchwyh-fs8

Note that only the last member is collapsible (has a [-]). The global collapse control on the top-right corner can still collapse everything (as a result, you can't independently open X and Y after they are collapsed since the control [+] is missing).

This seems to happen only for 1.19.0+. Same result on Firefox and Chrome.

Real world example:


$ rustdoc -vV
rustdoc 1.19.0-nightly (03abb1bd7 2017-06-13)
binary: rustdoc
commit-hash: 03abb1bd70ac56e4aba0684bab819892a0157843
commit-date: 2017-06-13
host: x86_64-apple-darwin
release: 1.19.0-nightly
LLVM version: 4.0
@Mark-Simulacrum Mark-Simulacrum added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 23, 2017
bors added a commit that referenced this issue Jul 5, 2017
…dreavus

Toggle wrappers are now generated correctly

Fixes #42674.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants