ICE when attempting to return inside a "do catch" block (with #![feature(catch_expr)]) #45124
Labels
C-bug
Category: This is a bug.
F-try_blocks
`#![feature(try_blocks)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
It seems like a
return
in ado catch {}
block can sometimes cause an ICE.catch.rs
:I'm using
rustc 1.22.0-nightly (150b625a0 2017-10-08)
. Compiling withrustc catch.rs
results inThe error does not occur with
Err(())
in place of thereturn;
. It also does not occur if areturn;
is added after thedo catch {}
block (and in that case the compiler correctly warns that the newly-addedreturn
is unreachable).The backtrace (from
RUST_BACKTRACE=full
):Output of
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: