/src/test/run-pass/generic-tag-alt.rs
http://github.com/jruderman/rust · Rust · 11 lines · 7 code · 4 blank · 0 comment · 1 complexity · 8e849c75a590598396e52f9978d7bfe2 MD5 · raw file
- enum foo<T> { arm(T), }
- fn altfoo<T>(f: foo<T>) {
- let mut hit = false;
- match f { arm::<T>(x) => { debug!{"in arm"}; hit = true; } }
- assert (hit);
- }
- fn main() { altfoo::<int>(arm::<int>(10)); }