rust/src/test/run-pass/last-use-is-capture.rs

9 lines
152 B
Rust
Raw Normal View History

// Make sure #1399 stays fixed
fn main() {
fn invoke(f: fn@()) { f(); }
let k = ~22;
2012-12-06 00:51:32 +00:00
let _u = {a: copy k};
2012-06-30 23:19:07 +00:00
invoke(|| log(error, k) )
}