Skip to content

experiment: change RawSmallVec heap to NonNull<[MaybeUninit<T>]>#441

Description

@alejandro-vaz

we can be pretty sure that the union won't change

馃憤

and we wouldn't be able to switch to something like NonNull<[T]> (a fat pointer) because our TaggedLen has a bit it uses for union variant tracking. it's not true "length"

The length of the [T] would be the capacity in that case. Perhaps more clearly, it could be NonNull<[MaybeUninit<T>]> (or maybe even ManuallyDrop<Box<[MaybeUninit<T>]>>). In any case, (NonNull<T>, usize) is Fine:tm: for the purposes of this, so it doesn't matter much.

Originally posted by @zachs18 in #348 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions