graydon/rust — Issue #1257: Leak with do loops
Author: brson
Created: 2011-12-04 01:46:05+00:00
State: open
Labels: bug, trans, unassigned

```
fn main () {
let line = "";
let i = 0;
do {
line = if i == 3 { "exit" } else { "notexit" };
i += 1;
} while line != "exit";
}
```

This leaks the string.