Skip to content

Replace &'a Ident with Cow in FnArg Enum #4156

@newcomertv

Description

@newcomertv

Deriving PyClass for Tuple Enums requires defining identifiers for anonymous fields.
In PR: #4072 this is done by leaking memory during the build process.

FnArg takes a reference with lifetime which would need to outlive the scope of the derive macro where the ident is created.
In order to deallocate this properly we need to move ownership into FnArg for that case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions