PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/jruderman/rust
Rust | 7 lines | 5 code | 2 blank | 0 comment | 0 complexity | e98a46cb8e737469c553946add24ff38 MD5 | raw file
1enum maybe<T> { nothing, just(T), }
2
3fn foo(x: maybe<int>) {
4    match x { nothing => { error!{"A"}; } just(a) => { error!{"B"}; } }
5}
6
7fn main() { }