aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail/capture1.rs
blob: fb1d82fe5a083d1cfd6d966bded1cf7a51c71775 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
// -*- rust -*-

// error-pattern: attempted dynamic environment-capture

fn main() {

    fn foo() -> int {
        ret bar;
    }

    let int bar = 5;
}