mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
16 lines
306 B
Rust
16 lines
306 B
Rust
// run-pass
|
|
#![allow(unused_assignments)]
|
|
#![allow(unused_variables)]
|
|
|
|
pub fn main() {
|
|
let mut y: isize = 42;
|
|
let mut z: isize = 42;
|
|
let mut x: isize;
|
|
while z < 50 {
|
|
z += 1;
|
|
while false { x = y; y = z; }
|
|
println!("{}", y);
|
|
}
|
|
assert!((y == 42 && z == 50));
|
|
}
|