diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-02-03 12:11:11 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-02-03 13:33:45 +1100 |
| commit | 0eb297d3e04e618b96e668e8e9ed9ddf66d671fb (patch) | |
| tree | f4f5da7b4383f294a438c588b117232b815f3233 /src/test/debuginfo/enum-thinlto.rs | |
| parent | eed12bcd0cb281979c4c9ed956b9e41fda2bfaeb (diff) | |
| download | rust-0eb297d3e04e618b96e668e8e9ed9ddf66d671fb.tar.gz rust-0eb297d3e04e618b96e668e8e9ed9ddf66d671fb.zip | |
Fix up `merge_from_succ`.
This function has a variable `changed` that is erroneously used for two related-but-different purpose: - to detect if the current element has changed; - to detect if any elements have changed. As a result, its use for the first purpose is broken, because if any prior element changed then the code always thinks the current element has changed. This is only a performance bug, not a correctness bug, because we frequently end up calling `assign_unpacked` unnecessarily to overwrite the element with itself. This commit adds `any_changed` to correctly distinguish between the two purposes. This is a small perf win for some benchmarks.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
