about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/patch.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-02-18 11:24:57 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-02-18 12:52:56 +1100
commita1daa34ad005d0b34d30c878cb4e2e995346d300 (patch)
treebde73eb01e0197b4c9064ed7c9a0a01ba00a0c5e /compiler/rustc_mir_transform/src/patch.rs
parentce36a966c79e109dabeef7a47fe68e5294c6d71e (diff)
downloadrust-a1daa34ad005d0b34d30c878cb4e2e995346d300.tar.gz
rust-a1daa34ad005d0b34d30c878cb4e2e995346d300.zip
Use `MirPatch` in `EnumSizeOpt`.
Instead of `expand_statements`. This makes the code shorter and
consistent with other MIR transform passes.

The tests require updating because there is a slight change in
MIR output:
- the old code replaced the original statement with twelve new
  statements.
- the new code inserts converts the original statement to a `nop` and
  then insert twelve new statements in front of it.

I.e. we now end up with an extra `nop`, which doesn't matter at all.
Diffstat (limited to 'compiler/rustc_mir_transform/src/patch.rs')
0 files changed, 0 insertions, 0 deletions