This commit is contained in:
Chris Fallin 2021-12-11 22:44:48 -08:00
parent 1726ec2cc7
commit 0473031ba4
2 changed files with 3 additions and 2 deletions

View file

@ -836,8 +836,9 @@ impl<'a, 'b> FunctionBodyBuilder<'a, 'b> {
.map(|(_ty, value)| *value)
.collect::<Vec<_>>();
self.locals.start_block(*el);
self.locals.finish_block();
self.cur_block = Some(*el);
self.emit_branch(*out, &else_result_values[..]);
self.locals.finish_block();
assert_eq!(self.op_stack.len(), *start_depth);
self.cur_block = Some(*out);
self.locals.seal_block_preds(*out, &mut self.body);

View file

@ -414,7 +414,7 @@ impl Terminator {
) if i <= targets.len() => {
f(&mut targets[i - 1]);
}
_ => panic!("out of bounds"),
(i, this) => panic!("out of bounds: index {} term {:?}", i, this),
}
}