/src/test/run-pass/nested-alts.rs

http://github.com/jruderman/rust · Rust · 15 lines · 12 code · 3 blank · 0 comment · 2 complexity · 20b220a7a36b09d2ff63d2d959bf7401 MD5 · raw file

  1. fn baz() -> ! { fail; }
  2. fn foo() {
  3. match some::<int>(5) {
  4. some::<int>(x) => {
  5. let mut bar;
  6. match none::<int> { none::<int> => { bar = 5; } _ => { baz(); } }
  7. log(debug, bar);
  8. }
  9. none::<int> => { debug!{"hello"}; }
  10. }
  11. }
  12. fn main() { foo(); }