Skip to content

Doc block not allowed for the last element of an enum #17411

Closed
@Geal

Description

@Geal
enum a { 
  B = 0, /** hello */
  C, /** world */
  D /** ! */
}

fn main() {
}
$ rustc enum.rs 
enum.rs:4:5: 4:13 error: expected `}`, found `/** ! */`
enum.rs:4   D /** ! */
              ^~~~~~~~

Not a big issue, but still a bit annoying. If I remove the last code blocks, it compiles fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions