-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-collectionsArea: `std::collections`Area: `std::collections`T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
After #53508 lands, we could look into this. It might provide a bit more type-safety, although it could be worse to not have the capacity as a separate field.
One thing to note is that setting the "length" component of a reference/pointer to (please ignore, I managed to confuse myself)[MaybeUninit<T>]
is "less unsafe" than doing so for for [T]
, but it's unclear to me whether having a &[MaybeUninit<T>]
that's larger than the object it points to, is UB or not.
scottmcm
Metadata
Metadata
Assignees
Labels
A-collectionsArea: `std::collections`Area: `std::collections`T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.