Skip to content

rustdoc: curly brace in wrong place for Cow #97733

Closed
@jsha

Description

@jsha

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)),
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions