mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
The match on terminator kind has three almost identical arms for `Call`,
`Yield`, and `InlineAsm`. The only difference is the label ("(on
successful return)" vs. "(on yield resume)") and the third
`CallReturnPlaces` argument to `apply_call_return_effect`. The latter is
exactly computed by `Terminator::edges` (in the `AssignOnReturn`
result), so this commit rewrites the code to use that.
There is one slight behavioural change, an improvement: in the case
where a `Call` doesn't return (i.e. `return_.is_empty()` is true)
a "(on successful return)" row is no longer printed.