Skip to content

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

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.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions