Skip to content

No type inference for subslices in slice patterns #4830

@Vlad-Shcherbina

Description

@Vlad-Shcherbina

To reproduce, mouse hover over _tail in the following program:

fn main() {
    if let [_head, _tail @ ..] = &[1][..] {}
}

Expected result

&[i32]

Actual result

{unknown}


rust-analyzer version: 2020-06-08 (d696776)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tytype system / type inference / traits / method resolution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions