diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-09-19 01:29:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-19 01:29:42 +0200 |
| commit | 3cf5a6beaa2d6ca90a65821ea6b3e9f71b9a1c93 (patch) | |
| tree | afe0448724a59cad150709a5363b8c70e67d6557 /compiler/rustc_mir_transform/src/coverage/debug.rs | |
| parent | 970ee09c2241f738fe7513460bcd0ad086fee82e (diff) | |
| parent | 01b67f4b26f420b8713f11b04594f51e687f95fc (diff) | |
| download | rust-3cf5a6beaa2d6ca90a65821ea6b3e9f71b9a1c93.tar.gz rust-3cf5a6beaa2d6ca90a65821ea6b3e9f71b9a1c93.zip | |
Rollup merge of #115930 - Zalathar:spans-bug, r=compiler-errors
coverage: Fix an unstable-sort inconsistency in coverage spans This code was calling `sort_unstable_by`, but failed to impose a total order on the initial spans. That resulted in unpredictable handling of closure spans, producing inconsistencies in the coverage maps and in user-visible coverage reports. This PR fixes the problem by always sorting closure spans before otherwise-identical non-closure spans, and also switches to a stable sort in case the ordering is still not total. --- In addition to the fix itself, this PR also contains a cleanup to the comparison function that I was working on when I discovered the bug.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions
