rust/compiler/rustc_mir_build/src
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
..
build Rollup merge of #127472 - Zalathar:block-and-unit, r=fmease 2024-07-17 16:22:28 +02:00
thir Auto merge of #125507 - compiler-errors:type-length-limit, r=lcnr 2024-07-03 11:56:36 +00:00
check_unsafety.rs Add TODO comment to unsafe env modification 2024-06-12 17:51:18 +02:00
errors.rs Use a dedicated type instead of a reference for the diagnostic context 2024-06-18 15:42:11 +00:00
lib.rs Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
lints.rs Fix unconditional recursion lint wrt tail calls 2024-07-07 17:11:05 +02:00