Skip to content

Filter doc comments from macro input #18076

Closed
@Binero

Description

@Binero

This seems to be a very inconsistant issue, but I think it's related to macros.

Here's an example of a list of comments that don't get parsed properly:

bitflags! {
    flags Tests: Test {
        /// Test
        static TestA = 0x80,
        // TODO: Document this.
        static TestB          = 0x40
    }
}

This code will error saying "no rules expected the token /// Test".
http://is.gd/Zkpgvd

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions