blob: 3e1a232115f7d286d391a51bb6b9b2a56daf0c0a [file] [log] [blame]
Graydon Hoared1affff2012-12-11 01:32:481// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
Sean Moonbd4ee7c2013-05-08 17:34:4711// Issue #825: Should recheck the loop condition after continuing
Graydon Hoare89c8ef72013-02-02 03:43:1712pub fn main() {
Tobias Bucher7f64fe42015-01-25 21:05:0313 let mut i = 1;
Graydon Hoare8b580952011-12-22 22:42:5214 while i > 0 {
Patrick Walton1e915952013-03-29 01:39:0915 assert!((i > 0));
Alex Crichtoncc6ec8d2014-03-09 06:11:4416 println!("{}", i);
Graydon Hoare8b580952011-12-22 22:42:5217 i -= 1;
Brian Anderson88272a42013-09-26 00:56:5418 continue;
Graydon Hoare8b580952011-12-22 22:42:5219 }
20}