Closed
Description
Compiling the following code (with current master) results in "error: non-exhaustive patterns: vectors of length 2 not covered". I don't know if this ought to be valid, but at least the error-message is wrong, because obviously there is a match-branch for vectors of length 2.
fn main() {
let x = [1,2];
let y = match x {
[] => None,
[a,_] => Some(a)
};
println!("{}", y);
}
Metadata
Metadata
Assignees
Labels
No labels