Skip to content

Nested slice pattern incorrectly considered irrefutable #26158

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemT-langRelevant to the language team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions