Skip to content

Only create accessors for initialized fields if it would be used #98

@BennoLossin

Description

@BennoLossin

Currently field accessors are always created (unless the #[disable_initialized_field_access] option is given to the initializer). An alternative would be to scan the body of the initializer and check if it uses the fields. If it doesn't then do not generate an accessor.

Suggested by @nbdd0121 (https://lore.kernel.org/all/[email protected]).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions