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

/src/test/run-pass/generic-tag-alt.rs

http://github.com/jruderman/rust
Rust | 11 lines | 7 code | 4 blank | 0 comment | 0 complexity | 8e849c75a590598396e52f9978d7bfe2 MD5 | raw file
 1
 2
 3enum foo<T> { arm(T), }
 4
 5fn altfoo<T>(f: foo<T>) {
 6    let mut hit = false;
 7    match f { arm::<T>(x) => { debug!{"in arm"}; hit = true; } }
 8    assert (hit);
 9}
10
11fn main() { altfoo::<int>(arm::<int>(10)); }