/src/test/run-pass/typestate-cfg-nesting.rs

http://github.com/jruderman/rust · Rust · 12 lines · 9 code · 3 blank · 0 comment · 6 complexity · 53408ca38e35cfc67afd9bd3357de3f7 MD5 · raw file

  1. fn f() {
  2. let x = 10; let mut y = 11;
  3. if true { match x { _ => { y = x; } } } else { }
  4. }
  5. fn main() {
  6. let x = 10;
  7. let mut y = 11;
  8. if true { while false { y = x; } } else { }
  9. }