Skip to content

Commit d328042

Browse files
committed
Merge branch 'break-continue-fix' of https://github.com/crw5996/RustPython into break-continue-fix
2 parents 5b86b91 + a451e4a commit d328042

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

vm/src/compile.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,19 +571,15 @@ impl Compiler {
571571
self.set_label(end_label);
572572
}
573573
ast::Statement::Break => {
574-
575574
if !self.in_loop {
576575
return Err(CompileError::SyntaxErr(String::from("break")));
577576
}
578-
579577
self.emit(Instruction::Break);
580578
}
581579
ast::Statement::Continue => {
582-
583580
if !self.in_loop {
584581
return Err(CompileError::SyntaxErr(String::from("continue")));
585582
}
586-
587583
self.emit(Instruction::Continue);
588584
}
589585
ast::Statement::Return { value } => {

0 commit comments

Comments
 (0)