Skip to content

Incorrect help message for bad tuple indexing on parenthesised array #56963

Closed
@varkor

Description

@varkor
fn main() {
    let x = [0u32];
    (x as [u32; 1]).0
}

The help message suggests:

help: instead of using tuple indexing, use array indexing: `x as [u32; 1][0]`

The parentheses have gone missing.

This is related to #56714.

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