rust/src/test/run-pass/issue-6141-leaking-owned-fn.rs

8 lines
81 B
Rust

fn run(f: &fn()) {
f()
}
fn main() {
let f: ~fn() = || ();
run(f);
}