Skip to content

Nested slice pattern incorrectly considered irrefutable #26158

Closed
@eefriedman

Description

@eefriedman

Testcase:

#![feature(slice_patterns)]
fn main() { let x: &[String] = &[]; let [[ref _a, _b..]..] = x; }

This clearly shouldn't type-check, but currently compiles without any error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemT-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