Closed
Description
The following code ICEs on nightly
, stable
and beta
:
fn main() {
loop {|_: [_; continue]| {}}
}
The ICE message is:
error: internal compiler error: librustc_mir/hair/cx/expr.rs:551: invalid loop id for continue: not inside loop scope
As of filing this bug, PR #51731 does not fix it. If I apply it, I'm getting:
error: internal compiler error: librustc_mir/build/scope.rs:552: no enclosing breakable scope found
--> $DIR/issue-XXXX.rs:12:19
|
LL | loop {|_: [_; continue]| {}}
| ^^^^^^^^