rust/tests
Matthias Krüger 49fb61c496
Rollup merge of #136958 - compiler-errors:additive-replacmeent, r=estebank
Fix presentation of purely "additive" replacement suggestion parts

#127541 changes replacement suggestions to use the "diff" view always, which I think is really verbose in cases where a replacement snippet is a "superset" of the snippet that is being replaced.

Consider:

```
LL -     Self::Baz: Clone,
LL +     Self::Baz: Clone, T: std::clone::Clone
```

In this code, we suggest replacing `", "` with `", T: std::clone::Clone"`. This is a consequence of how the snippet is constructed. I believe that since the string that is being replaced is a subset of the replacement string, it's not providing much value to present this as a diff. Users should be able to clearly understand what's being suggested here using the `~` underline view we've been suggesting for some time now.

Given that this affects ~100 tests out of the ~1000 UI tests affected, I expect this to be a pretty meaningful improvement of the fallout of #127541.

---

In the last commit, this PR also "trims" replacement parts so that they are turned into their purely additive subset, if possible. See the diff for what this means.

---

r? estebank
2025-02-14 16:23:32 +01:00
..
assembly Rollup merge of #134999 - Berrysoft:dev/new-cygwin-target, r=chenyukang,workingjubilee 2025-02-13 03:53:28 -05:00
auxiliary Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validity 2025-02-13 03:45:04 +00:00
codegen Auto merge of #136735 - scottmcm:transmute-nonnull, r=oli-obk 2025-02-14 09:06:17 +00:00
codegen-units Remove -Zinline-in-all-cgus and clean up CGU partitioning tests 2025-01-27 23:48:47 -05:00
coverage coverage: Eliminate more counters by giving them to unreachable nodes 2025-02-13 13:45:53 +11:00
coverage-run-rustdoc
crashes adjust derive_error 2025-02-13 23:49:09 +01:00
debuginfo Revert "Remove the Arc rt::init allocation for thread info" 2025-01-14 13:37:25 +01:00
incremental tests: error strings for ABI stability now match 2025-02-09 20:45:47 -08:00
mir-opt transmute should also assume non-null pointers 2025-02-12 23:01:27 -08:00
pretty
run-make Make -O mean -C opt-level=3 2025-02-13 19:47:55 +00:00
rustdoc Add regression test for source line numbers 2025-02-11 14:29:58 +01:00
rustdoc-gui rustdoc: use better, consistent SVG icons for scraped examples 2025-02-12 16:07:11 -07:00
rustdoc-js
rustdoc-js-std Remove the common prelude module 2025-02-11 13:04:27 -08:00
rustdoc-json Add missing lang items in no_core tests in rustdoc 2025-02-04 01:05:31 +00:00
rustdoc-ui Rollup merge of #136927 - GuillaumeGomez:add-missing-hashtag-escape, r=notriddle 2025-02-12 20:10:01 -05:00
ui Rollup merge of #136958 - compiler-errors:additive-replacmeent, r=estebank 2025-02-14 16:23:32 +01:00
ui-fulldeps Rollup merge of #134777 - saethlin:enable-more-tests-on-windows, r=Noratrieb 2025-02-04 05:36:50 -05:00
COMPILER_TESTS.md