2010-08-30 22:07:32 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
// -*- rust -*-
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2012-03-22 10:39:41 -05:00
|
|
|
let mut i: int = 90;
|
2011-07-27 07:19:39 -05:00
|
|
|
while i < 100 {
|
2013-03-08 14:39:42 -06:00
|
|
|
debug!(i);
|
2011-06-15 13:19:50 -05:00
|
|
|
i = i + 1;
|
2011-07-27 07:19:39 -05:00
|
|
|
if i == 95 {
|
2012-06-29 18:26:56 -05:00
|
|
|
let v: ~[int] =
|
|
|
|
~[1, 2, 3, 4, 5]; // we check that it is freed by break
|
2011-06-15 13:19:50 -05:00
|
|
|
|
2012-08-22 19:24:52 -05:00
|
|
|
debug!("breaking");
|
2011-06-15 13:19:50 -05:00
|
|
|
break;
|
|
|
|
}
|
2010-08-30 22:07:32 -05:00
|
|
|
}
|
2013-05-18 21:02:45 -05:00
|
|
|
assert_eq!(i, 95);
|
2011-08-10 11:27:22 -05:00
|
|
|
}
|