Skip to content

[[T]] is allowed in structs #25692

Closed
Closed
@kornelski

Description

@kornelski

The following construct compiles:

struct Foo {
 foo: [[u8]],
}

Even though let foo: [[u8]] doesn't. From my very limited understanding this type doesn't make sense, so it'd be nice if the compiler rejected it at the point of definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)P-mediumMedium priorityT-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions