Files
rust/compiler/rustc_mir_dataflow/src/framework
Nicholas Nethercote d0eab573aa Change SwitchInt handling in dataflow analysis.
We call `get_switch_int_data` once for the switch and then pass that
data to `apply_switch_int_edge_effect` for each switch target.

The only case in practice is `MaybePlacesSwitchIntData` which does an
awkward thing, maintaining an index into the discriminants and updating
it on each call to `apply_switch_int_edge_effect`.

This commit changes things to do more work up front in
`get_switch_int_data`, in order to then do less work in
`apply_switch_int_edge_effect`. This avoids the need for the `variants`
and `next_discr` methods and the discriminants index. Overall it's a
little simpler.
2026-05-05 13:02:52 +10:00
..
2025-10-28 10:26:50 +11:00
2025-01-11 11:34:01 +00:00
2026-02-20 09:50:16 +01:00
2025-01-11 11:34:01 +00:00
2025-10-28 10:26:50 +11:00
2025-10-28 10:26:50 +11:00
2025-10-28 10:26:50 +11:00