summary refs log tree commit diff
path: root/src/test/compile-fail/liveness-init-in-fn-expr.rs
blob: cffba2132c2c1da1c051d25ca52e124d8b0e2b17 (plain)
1
2
3
4
5
6
7
fn main() {
    let f = fn@() -> int {
        let i: int;
        ret i; //~ ERROR use of possibly uninitialized variable: `i`
    };
    log(error, f());
}