/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
- enum maybe<T> { nothing, just(T), }
- fn foo(x: maybe<int>) {
- match x { nothing => { error!{"A"}; } just(a) => { error!{"B"}; } }
- }
- fn main() { }