aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/slicepattern-size-mismatch.rs
blob: b54b53206044b1d855832b2082aa3b8b1fc0932b (plain)
1
2
3
4
5
6
7
8
fn main() {
    let arr = [0, 1];

    match arr {
        [0, 1, 2] => {} // { dg-error "pattern requires 3 elements but array has 2 .E0527." }
        _ => {}
    }
}