Allow break and co to go through try{} blocks

This commit is contained in:
Maybe Waffle 2022-12-28 20:46:45 +00:00
parent 16264a3a53
commit eecab99dec
2 changed files with 19 additions and 23 deletions

View file

@ -152,7 +152,7 @@ impl<'a> InferenceContext<'a> {
.1
}
Expr::TryBlock { body } => {
self.with_breakable_ctx(BreakableKind::Border, self.err_ty(), None, |this| {
self.with_breakable_ctx(BreakableKind::Block, self.err_ty(), None, |this| {
let _inner = this.infer_expr(*body, expected);
});
// FIXME should be std::result::Result<{inner}, _>