Skip to content

Change uninitialized to return an array of MaybeUninit #685

Closed
@jturner314

Description

@jturner314

The .uninitialized() method on ArrayBase has some issues. For example, Array1::<bool>::uninitialized(2) is undefined behavior.

Rust 1.36 added std::mem::MaybeUninit for safer handling of uninitialized data. We should replace the existing .uninitialized() method on ArrayBase with one that returns an array of MaybeUninit instances. We then need to add the necessary methods to cleanly work with arrays like this (e.g. an array-level equivalent of assume_init).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions