Skip to content

decl macro 2.0 doesn't allow trailing comma #63102

Closed
@bjorn3

Description

@bjorn3
macro abc {
    () => {},

(Playground)

Errors:

   Compiling playground v0.0.1 (/playground)
error: unexpected end of macro invocation
 --> src/lib.rs:2:14
  |
2 |     () => {},
  |              ^ missing tokens in macro arguments

error: aborting due to previous error

error: Could not compile `playground`.

To learn more, run the command again with --verbose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)A-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.T-compilerRelevant to the compiler 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