os-rust/compiler/rustc_mir_build
Matthias Krüger c98487e3be
Rollup merge of #127472 - Zalathar:block-and-unit, r=fmease
MIR building: Stop using `unpack!` for `BlockAnd<()>`

This is a subset of #127416, containing only the parts related to `BlockAnd<()>`.

The first patch removes the non-assigning form of the `unpack!` macro, because it is frustratingly inconsistent with the main form. We can replace it with an ordinary method that discards the `()` and returns the block.

The second patch then finds all of the remaining code that was using `unpack!` with `BlockAnd<()>`, and updates it to use that new method instead.

---

Changes since original review of #127416:
- Renamed `fn unpack_block` → `fn into_block`
- Removed `fn unpack_discard`, replacing it with `let _: BlockAnd<()> = ...` (2 occurrences)
- Tweaked `arm_end_blocks` to unpack earlier and build `Vec<BasicBlock>` instead of `Vec<BlockAnd<()>>`
2024-07-17 16:22:28 +02:00
..
src Rollup merge of #127472 - Zalathar:block-and-unit, r=fmease 2024-07-17 16:22:28 +02:00
Cargo.toml Remove some unused crate dependencies. 2024-06-10 19:55:49 +10:00
messages.ftl Fix remaining cases 2024-06-21 19:00:18 -04:00