about summary refs log tree commit diff
path: root/tests/ui/for-loop-while/issue-1257.rs
blob: 369302f9f12e7a55f0be68a373383fa68ebb8853 (plain)
1
2
3
4
5
6
7
8
9
10
//@ run-pass

pub fn main () {
  let mut line = "".to_string();
  let mut i = 0;
  while line != "exit".to_string() {
    line = if i == 9 { "exit".to_string() } else { "notexit".to_string() };
    i += 1;
  }
}