/src/test/run-pass/alt-pattern-no-type-params.rs

http://github.com/jruderman/rust · Rust · 7 lines · 5 code · 2 blank · 0 comment · 1 complexity · e98a46cb8e737469c553946add24ff38 MD5 · raw file

  1. enum maybe<T> { nothing, just(T), }
  2. fn foo(x: maybe<int>) {
  3. match x { nothing => { error!{"A"}; } just(a) => { error!{"B"}; } }
  4. }
  5. fn main() { }