Closed
Description
let f: |[int, ..2]| -> int = |[i, j]| i+j;
produces
foo.rs:2:35: 2:41 error: refutable pattern in function argument
foo.rs:2 let f: |[int, ..2]| -> int = |[i, j]| i+j;
^~~~~~
But
for [i, j] in Some([1,2]).move_iter() {}
is fine.
rustc 0.11.0-pre (fbd8f4a 2014-05-15 08:36:50 -0700)
host: x86_64-unknown-linux-gnu
Metadata
Metadata
Assignees
Labels
No labels