about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/source-script.js
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2023-01-05 10:15:33 +0100
committerTomasz Miąsko <tomasz.miasko@gmail.com>2023-02-23 14:05:03 +0100
commit23e3840014e17cd20f6ebe5e268133b3ce5ab1a6 (patch)
treeb93649562063a9b4f68ccb6186aa1aba4c778542 /src/librustdoc/html/static/js/source-script.js
parent00eec854f167c546cedd0911f4cc302a54ed0be9 (diff)
downloadrust-23e3840014e17cd20f6ebe5e268133b3ce5ab1a6.tar.gz
rust-23e3840014e17cd20f6ebe5e268133b3ce5ab1a6.zip
Remove dead unwinds before drop elaboration
As a part of drop elaboration, we identify dead unwinds, i.e., unwind
edges on a drop terminators which are known to be unreachable, because
there is no need to drop anything.

Previously, the data flow framework was informed about the dead unwinds,
and it assumed those edges are absent from MIR. Unfortunately, the data
flow framework wasn't consistent in maintaining this assumption.

In particular, if a block was reachable only through a dead unwind edge,
its state was propagated to other blocks still. This became an issue in
the context of change removes DropAndReplace terminator, since it
introduces initialization into cleanup blocks.

To avoid this issue, remove unreachable unwind edges before the drop
elaboration, and elaborate only blocks that remain reachable.
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
0 files changed, 0 insertions, 0 deletions