Files
rust/tests/ui/pattern/array-length-mismatch-13482.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
219 B
Rust
Raw Normal View History

2025-07-24 17:52:22 +05:00
//! Regression test for https://github.com/rust-lang/rust/issues/13482
fn main() {
let x = [1,2];
let y = match x {
[] => None, //~ ERROR pattern requires 0 elements but array has 2
[a,_] => Some(a)
};
}