Manishearth / humpty_dumpty

Implicit Drop/move protection for Rust (linear types)
12 stars 1 forks source link

Handle break and continue statements in loops #5

Closed Munksgaard closed 9 years ago

Munksgaard commented 9 years ago

The following should be allowed

let c = chan();
let mut n = 0;
loop {
    if n < 10 {
        n += 1;
    } else {
        close(c);
        break;
    }
}
Munksgaard commented 9 years ago

Closed with #9

Munksgaard commented 9 years ago

Actually, the above particular example doesn't work :blush:...