diff options
| author | bors <bors@rust-lang.org> | 2025-09-05 17:31:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-05 17:31:56 +0000 |
| commit | 27250a3c7dfb3e0d2f9a15085439da2b3f540c9b (patch) | |
| tree | 3e836c3f116fea133c8faea35375dab6077c9f3c /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 9b0611ff7aeb28bd3fcd3117256a1d9d9c2f1921 (diff) | |
| parent | b2eb28da2342e60779a6d78d19c991c99e1b5c37 (diff) | |
| download | rust-27250a3c7dfb3e0d2f9a15085439da2b3f540c9b.tar.gz rust-27250a3c7dfb3e0d2f9a15085439da2b3f540c9b.zip | |
Auto merge of #146121 - Muscraft:filter-suggestion-parts, r=petrochenkov
fix: Filter suggestion parts that match existing code
While testing my changes to make `rustc` use `annotate-snippets`, I encountered a new `clippy` test failure stemming from [two](https://github.com/rust-lang/rust/pull/145273/files#diff-6e8403e31463539666afbc00479cb416dc767a518f562b6e2960630953ee7da2R275-R278) [suggestion](https://github.com/rust-lang/rust/pull/145273/files#diff-6e8403e31463539666afbc00479cb416dc767a518f562b6e2960630953ee7da2R289-R292) output changes in rust-lang/rust#145273. The new output in these two cases feels like a regression as it is not as clear as the old output, and adds unnecessary information.
Before rust-lang/rust#145273 (`Diff` style)

After rust-lang/rust#145273 ("multi-line" style)

The reason for the change was that a new suggestion part (which matches existing code) was added on a different line than the existing parts, causing the suggestion style to change from `Diff` to "multi-line". Since this new part matches existing code, no code changes show up in the output for it, but it still makes the suggestion style "multi-line" when it doesn't need to be.
To get the old output back, I made it so that suggestion parts that perfectly match existing code get filtered out.
try-job: aarch64-apple
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
