aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/bad-env-capture.rs
blob: fa1e1d08acf80ed8215f3f4d6ed28ef76c8d81a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
// xfail-stage0
// xfail-stage1
// error-pattern: attempted dynamic environment-capture
fn foo() {
  let int x;
  fn bar() {
    log x;
  }
}
fn main() {
  foo();
}