]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #76748 - tmiasko:no-op-jumps, r=matthewjasper
authorbors <bors@rust-lang.org>
Thu, 24 Sep 2020 05:57:06 +0000 (05:57 +0000)
committerbors <bors@rust-lang.org>
Thu, 24 Sep 2020 05:57:06 +0000 (05:57 +0000)
commit5562bb6d749df0469cd1407e97252f51ecbef066
tree947f78fbfb0eafa3cddfb424482ecf623d529900
parent78a089487b5f6d5e4205ac4500410b442857bced
parentff1a9e406bfccefedb6c4f2cabc0c4d59ac947d4
Auto merge of #76748 - tmiasko:no-op-jumps, r=matthewjasper

Fix underflow when calculating the number of no-op jumps folded

When removing unwinds to no-op blocks and folding jumps to no-op blocks,
remove the unwind target first. Otherwise we cannot determine if target
has been already folded or not.

Previous implementation incorrectly assumed that all resume targets had
been folded already, occasionally resulting in an underflow:

```
remove_noop_landing_pads: removed 18446744073709551613 jumps and 3 landing pads
```