Skip to content

No SyntaxExtension variant can modify foreign items #27126

Closed
@tomjakubowski

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.

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