PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/compile-fail/capture1.rs

http://github.com/jruderman/rust
Rust | 8 lines | 4 code | 2 blank | 2 comment | 0 complexity | e70f5ab86737e1980599fd577a2e7bf2 MD5 | raw file
1// -*- rust -*-
2
3// error-pattern: attempted dynamic environment-capture
4
5fn main() {
6    let bar: int = 5;
7    fn foo() -> int { return bar; }
8}