Skip to content

rustdoc displays "pub" to struct-like enum variants and their fields #32395

Description

@nodakai
pub enum RangeInclusive<Idx> {
    pub Empty {
        pub at: Idx,
    },
    pub NonEmpty {
        pub start: Idx,
        pub end: Idx,
    },
}

This is no longer valid Rust: https://doc.rust-lang.org/error-index.html#E0449

Incidentally, tuple-like enum variants seems to be free from this issue:

pub enum Component<'a> {
    Prefix(PrefixComponent<'a>),
    RootDir,
    CurDir,
    ParentDir,
    Normal(&'a OsStr),
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    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