Skip to content

Pass doc comments to proc macro not as a Literal #48189

Closed
@dtolnay

Description

@dtolnay

Doc comments should be parsed as a sequence of tokens # [ doc = ... ] rather than as a TokenNode::Literal. I believe this approach has worked well for macros-by-example. Nobody considers doc comments to be a type of "literal" and it can be surprising when they pop up this way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions