Skip to content

Error message for E0307 is weird #26485

Closed
@tbu-

Description

@tbu-
a.rs:8:17: 8:38 error: expected constant integer for repeat count, but unsupported constant expr [E0307]
a.rs:8     let a = [0; mem::size_of::<i32>()];
                       ^~~~~~~~~~~~~~~~~~~~~
a.rs:8:17: 8:38 help: run `rustc --explain E0307` to see a detailed explanation
error: aborting due to previous error

The message "expected constant integer for repeat count, but unsupported constant expr" is a bit weird (ungrammatical?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions