rust/src/test/compile-fail/break-outside-loop.rs
Marijn Haverbeke 87e097a853 Disallow ret inside of block functions
Also adds proper checking for cont/break being inside a loop.

Closes #1854
Issue #1619
2012-03-26 12:45:47 +02:00

8 lines
111 B
Rust

// error-pattern:`break` outside of loop
fn main() {
let pth = break;
let rs: {t: str} = {t: pth};
}