Skip to content

Implement IzZero for zeroable default types #60978

Open
@Pzixel

Description

@Pzixel

As discussed in #54628 there are some critical optimizations based on fact that type default value can be represented with mem::zeroed(), such as this vec allocation code.

There is a trait describing this behavior. I propose implementing it for some standard types, such as std::num::Wrapping or Option, or even making it public.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-collectionsArea: `std::collections`C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions