Skip to content
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

Rustdoc: strange collapse behaviour when impl block has comment #71849

Closed
tspiteri opened this issue May 3, 2020 · 0 comments · Fixed by #79796
Closed

Rustdoc: strange collapse behaviour when impl block has comment #71849

tspiteri opened this issue May 3, 2020 · 0 comments · Fixed by #79796
Assignees
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@tspiteri
Copy link
Contributor

tspiteri commented May 3, 2020

pub struct S;
impl S {
    pub const C1: () = ();
    pub fn foo1() {}
}
/// Comment
impl S {
    pub const C2: () = ();
    pub fn foo2() {}
}
/// Comment
impl S {
    pub const C3: () = ();
    pub fn foo3() {}
}

On the left of the image is the documentation for the three blocks.

  1. No comment for the impl block.
  2. The comment for the impl block is expanded.
  3. The comment for the impl block is collapsed.

On the right, there is what happens when the three impl blocks are collapsed.

  1. Collapsed as expected, with both constant and function hidden as expected.
  2. The comment is still visible though its [-] is hidden. The function is hidden as expected but the constant is not hidden.
  3. The comment is hidden as expected. The function is hidden as expected but the constant is not hidden.

collapse

@tspiteri tspiteri added the C-bug Category: This is a bug. label May 3, 2020
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 3, 2020
@GuillaumeGomez GuillaumeGomez self-assigned this Dec 7, 2020
@GuillaumeGomez GuillaumeGomez added the A-rustdoc-ui Area: Rustdoc UI (generated HTML) label Dec 7, 2020
@bors bors closed this as completed in bfe49a0 Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants