-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-collectionsArea: `std::collections`Area: `std::collections`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: 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.Relevant to the library API team, which will review and decide on the PR/issue.
Description
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
Labels
A-collectionsArea: `std::collections`Area: `std::collections`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: 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.Relevant to the library API team, which will review and decide on the PR/issue.