| Add closures and unsafe; base16ct's lower.rs and upper.rs go through | 1 | //@ reject: captures by value |
| 2 | // Nim's closures capture by reference, as Rust's non-`move` closures do. A | |
| 3 | // `move` closure is a different thing, so it is not lowered to the same | |
| 4 | // construct. | |
| 5 | fn main() { | |
| 6 | let v: Vec<i32> = vec![1, 2, 3]; | |
| 7 | let f = move || v.len(); | |
| 8 | println!("{}", f()); | |
| 9 | } |