Skip to content

Layout of multi-dimensional arrays #277

Open
@Michael-F-Bryan

Description

@Michael-F-Bryan

I noticed the Layout of Rust array types and slices chapter from the Unsafe Code Guidelines doesn't mention anything about the layout of multi-dimensional arrays.

Can it be assumed that a [[T; N]; M] will have the same layout as a [T; N*M]?

I believe you can infer it to be true based on the first three paragraphs, but I thought I'd double-check because it doesn't explicitly mention anything about multi-dimensional arrays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions