Skip to content

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    experimentPossible experimentshelp wantedNo clear candidate to implement itp-lowlow priorityr-refactorrelated to refactoring

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions