]> git.lizzy.rs Git - rust.git/blob - tests/ui/for-loop-while/while.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / for-loop-while / while.rs
1 // run-pass
2
3
4 pub fn main() {
5     let mut x: isize = 10;
6     let mut y: isize = 0;
7     while y < x { println!("{}", y); println!("hello"); y = y + 1; }
8     while x > 0 {
9         println!("goodbye");
10         x = x - 1;
11         println!("{}", x);
12     }
13 }