/src/test/compile-fail/bad-env-capture2.rs

http://github.com/jruderman/rust · Rust · 5 lines · 4 code · 0 blank · 1 comment · 0 complexity · 67c1334808bb35f6bb2129872cc253d5 MD5 · raw file

  1. // error-pattern: attempted dynamic environment-capture
  2. fn foo(x: int) {
  3. fn bar() { log(debug, x); }
  4. }
  5. fn main() { foo(2); }