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


pub fn main() {
    let mut x: isize = 10;
    let mut y: isize = 0;
    while y < x { println!("{}", y); println!("hello"); y = y + 1; }
    while x > 0 {
        println!("goodbye");
        x = x - 1;
        println!("{}", x);
    }
}