Skip to content

No SyntaxExtension variant can modify foreign items #27126

Description

@tomjakubowski

SyntaxExtension::MultiModifier only visits true items, ImplItems, and TraitItems, not ForeignItems. This makes it impossible to write syntax extensions which operate directly on foreign items (e.g. functions declared inside an extern block).

I started work on rust-lang/rfcs#1217 out of tree but hit this issue almost right away.

Activity

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-syntaxextArea: Syntax extensionsC-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