Closed Munksgaard closed 9 years ago
The handle-return branch is an attempt to fix this.
In fact, we also need to support break
and continue
. For example, this should work:
fn loop_break() {
let foo = Foo;
loop {
foo.close();
break;
}
}
while this shouldn't
fn loop_break() {
let foo = Foo;
loop {
if something {
foo.close();
}
break;
}
}
Initial support for all this is in the handle-return branch. I probably need to finish the fix-generics branch before merging though.
The following code should be allowed
However, this shouldn't