Skip to content

decl macro 2.0 doesn't allow trailing comma #63102

Closed

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.

Activity

  1. added
    A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)
    A-parserArea: The lexing & parsing of Rust source code to an AST
    C-bugCategory: This is a bug.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jul 29, 2019
  2. matthewjasper commented on Jul 29, 2019

    @matthewjasper
    Contributor
  3. bjorn3 commented on Jul 29, 2019

    @bjorn3
    MemberAuthor

    Maybe someone forgot to change the trailing ; into , when changing the separating ; into , in the (copied?) parse code?

  4. added a commit that references this issue on Aug 2, 2019
    89dce46
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

    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