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: curly brace in wrong place for Cow #97733

Closed
jsha opened this issue Jun 4, 2022 · 0 comments · Fixed by #98256
Closed

rustdoc: curly brace in wrong place for Cow #97733

jsha opened this issue Jun 4, 2022 · 0 comments · Fixed by #98256
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jsha
Copy link
Contributor

jsha commented Jun 4, 2022

On https://doc.rust-lang.org/std/borrow/enum.Cow.html, the summary at the top of the page is:

pub enum Cow<'a, B> 
where
    B: 'a + [ToOwned](https://doc.rust-lang.org/std/borrow/trait.ToOwned.html) + ?[Sized](https://doc.rust-lang.org/std/marker/trait.Sized.html), 
 {
    Borrowed([&'a ](https://doc.rust-lang.org/std/primitive.reference.html)B),
    Owned(<B as [ToOwned](https://doc.rust-lang.org/std/borrow/trait.ToOwned.html)>::[Owned](https://doc.rust-lang.org/std/borrow/trait.ToOwned.html#associatedtype.Owned)),
}

The opening curly brace should be aligned to the left, matching the closing curly brace:

pub enum Cow<'a, B> 
where
    B: 'a + [ToOwned](https://doc.rust-lang.org/std/borrow/trait.ToOwned.html) + ?[Sized](https://doc.rust-lang.org/std/marker/trait.Sized.html),
{
    Borrowed([&'a ](https://doc.rust-lang.org/std/primitive.reference.html)B),
    Owned(<B as [ToOwned](https://doc.rust-lang.org/std/borrow/trait.ToOwned.html)>::[Owned](https://doc.rust-lang.org/std/borrow/trait.ToOwned.html#associatedtype.Owned)),
}
@jsha jsha added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Jun 4, 2022
@TaKO8Ki TaKO8Ki assigned TaKO8Ki and unassigned TaKO8Ki Jun 12, 2022
@bors bors closed this as completed in 4986379 Jul 6, 2022
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) 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.

2 participants