rust/tests/ui/for-loop-while/issue-1257.rs

11 lines
212 B
Rust
Raw Normal View History

//@ run-pass
pub fn main () {
2014-05-25 10:10:11 +00:00
let mut line = "".to_string();
2015-01-25 21:05:03 +00:00
let mut i = 0;
2014-05-25 10:10:11 +00:00
while line != "exit".to_string() {
line = if i == 9 { "exit".to_string() } else { "notexit".to_string() };
i += 1;
}
}