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

/src/test/run-pass/alt-phi.rs

http://github.com/jruderman/rust
Rust | 14 lines | 10 code | 4 blank | 0 comment | 0 complexity | d7c41651628a100107669602f17b2f4f MD5 | raw file
 1
 2
 3enum thing { a, b, c, }
 4
 5fn foo(it: fn(int)) { it(10); }
 6
 7fn main() {
 8    let mut x = true;
 9    match a {
10      a => { x = true; foo(|_i| { } ) }
11      b => { x = false; }
12      c => { x = false; }
13    }
14}