2010-08-30 22:07:32 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
// -*- rust -*-
|
2010-08-30 22:07:32 -05:00
|
|
|
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 {
|
2011-12-22 19:53:53 -06:00
|
|
|
log(debug, i);
|
2011-06-15 13:19:50 -05:00
|
|
|
i = i + 1;
|
2011-07-27 07:19:39 -05:00
|
|
|
if i == 95 {
|
2011-08-12 17:42:39 -05:00
|
|
|
let v: [int] =
|
2011-08-19 17:16:48 -05:00
|
|
|
[1, 2, 3, 4, 5]; // we check that it is freed by break
|
2011-06-15 13:19:50 -05:00
|
|
|
|
2011-12-22 16:42:52 -06:00
|
|
|
#debug("breaking");
|
2011-06-15 13:19:50 -05:00
|
|
|
break;
|
|
|
|
}
|
2010-08-30 22:07:32 -05:00
|
|
|
}
|
2011-06-15 13:19:50 -05:00
|
|
|
assert (i == 95);
|
2011-08-10 11:27:22 -05:00
|
|
|
}
|