Skip to content

concat_idents cannot be used in pattern position #50408

@ExpHP

Description

@ExpHP
Contributor
  • The three places where an ident-returning macro can be used are patterns, types, and expressions.
  • The two places where concat_idents can be used are types and expressions.
  • Hmmmm.

I looked around previous issues and PRs related to concat_idents and the word "pattern" never even comes up. This seems to be an accidental omission.

Activity

added
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on May 4, 2018
added
A-patternsRelating to patterns and pattern matching
on Aug 29, 2024
cyrgani

cyrgani commented on Jun 19, 2025

@cyrgani
Contributor

concat_idents is being removed in #142704. The new macro_metavar_expr_concat feature replaces it and can be used in pattern positions as well.

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-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-patternsRelating to patterns and pattern matchingC-feature-requestCategory: A feature request, i.e: not implemented / a PR.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

        Participants

        @cuviper@ExpHP@fmease@cyrgani

        Issue actions

          concat_idents cannot be used in pattern position · Issue #50408 · rust-lang/rust