Closed
Description
This should print ok
, but prints not ok
.
fn main() {
println(match &[1] {
[2, .. _] => "not ok",
[.. _] => "ok"
});
}
The problem seems to be the [.. _]
pattern, since if this is replaced by _
or a
, it prints ok
. It also prints ok
when matching on an empty vector. (The use of _
is not important.)