2023-12-19 17:39:58 +00:00
|
|
|
// compile-flags:-Z verbose-internals
|
2014-10-29 20:20:06 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = [1,2];
|
|
|
|
let y = match x {
|
2016-03-11 10:54:59 +00:00
|
|
|
[] => None, //~ ERROR pattern requires 0 elements but array has 2
|
2014-10-29 20:20:06 +00:00
|
|
|
[a,_] => Some(a)
|
|
|
|
};
|
|
|
|
}
|