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

fn main() {
  foo(2);
}