Open
Description
When std::mem::size_of::<T>() == 0
RawVec<T>
has always a capacity equal to std::usize::MAX
elements. It currently stores a cap: usize
that always contains this value but doing so is unnecessary in this case.
@withoutboats this would be a not so far fetched case for allowing struct
specialization like @arielb1 proposed.
Metadata
Metadata
Assignees
Labels
Area: Memory layout of typesArea: Trait impl specializationArea: Zero-sized types (ZSTs).Category: A feature request that has been accepted pending implementation.Category: An issue highlighting optimization opportunities or PRs implementing suchIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to performance of generated code.Relevant to the library API team, which will review and decide on the PR/issue.