mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
16 lines
307 B
Rust
16 lines
307 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));
|
|
}
|