rust/src/test/compile-fail/bad-var-env-capture-in-block-arg.rs

7 lines
153 B
Rust

fn main() {
let x = 3;
fn blah(_a: extern fn()) {}
blah(|| {
log(debug, x); //~ ERROR attempted dynamic environment capture
});
}