Skip to content

wrong help: try parenthesizing the first index #41650

Closed
@bjorn3

Description

@bjorn3

Code:

pub fn rust_function(x: ((i32, i32), i32)) -> i32 { x.0.0 }

Output:

(...)
help: try parenthesizing the first index
  | pub fn rust_function(x: ((i32, i32), i32)) -> i32 { x.(x.0).0 }
(...)

Expected:

(...)
help: try parenthesizing the first index
  | pub fn rust_function(x: ((i32, i32), i32)) -> i32 { (x.0).0 }
(...)

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