Skip to content

Macro expansion in for trait items #34183

Closed
@josephDunne

Description

@josephDunne

Hi, I see that in ast.rs there is no expectation for macro items inside a trait:

pub enum TraitItemKind {
    Const(P<Ty>, Option<P<Expr>>),
    Method(MethodSig, Option<P<Block>>),
    Type(TyParamBounds, Option<P<Ty>>),
}

Is there a reason for this? I would like to build up Trait definitions via macros the same way I would build a struct or impl items using macros.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions