SIGN IN SIGN UP
rust-lang / rust UNCLAIMED

Empowering everyone to build reliable and efficient software.

0 0 0 Rust

Auto merge of #61988 - Centril:there-is-only-loop, r=matthewjasper

[let_chains, 3/6] And then there was only Loop

Here we remove `hir::ExprKind::While`.
Instead, we desugar: `'label: while $cond $body` into:

```rust
'label: loop {
    match DropTemps($cond) {
        true => $body,
        _ => break,
    }
}
```

Per https://github.com/rust-lang/rust/issues/53667#issuecomment-471583239.
This is a follow up to https://github.com/rust-lang/rust/pull/59288 which did the same for `if` expressions.

r? @matthewjasper
B
bors committed
254f2014954bd66da206232490824975c0c662f1