/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

  1. enum foo<T> { arm(T), }
  2. fn altfoo<T>(f: foo<T>) {
  3. let mut hit = false;
  4. match f { arm::<T>(x) => { debug!{"in arm"}; hit = true; } }
  5. assert (hit);
  6. }
  7. fn main() { altfoo::<int>(arm::<int>(10)); }