Skip to content

Change ArrayBase.ptr to NonNull type #434

@jturner314

Description

@jturner314

Rust 1.25 introduces a NonNull type, which represents a pointer that must always be non-null. It would be nice to switch the ArrayBase.ptr field to type NonNull<S::Elem> to indicate that the pointer must always be non-null.

However, I'm not quite sure about the implications of NonNull<T> being "covariant over T". After reading this page in the nomicon, I think this is okay for Array, ArrayView, ArrayViewMut, and ArcArray, but I'm not sure that it's okay in general for arbitrary S: Data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions