-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-codegenArea: Code generationArea: Code generation
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.)
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generation