rust/tests
Jacob Pratt 2c374e3e21
Rollup merge of #137757 - estebank:trim-spans, r=davidtwco
On long spans, trim the middle of them to make them fit in the terminal width

When encountering a single line span that is wider than the terminal, we keep context at the start and end of the span but otherwise remove the code from the middle. This is somewhat independent from whether the left and right margins of the output have been trimmed as well.

```
error[E0308]: mismatched types
  --> $DIR/long-span.rs:6:15
   |
LL | ... = [0, 0, 0, 0, ..., 0, 0];
   |       ^^^^^^^^^^^^^...^^^^^^^ expected `u8`, found `[{integer}; 1681]`
```

Address part of https://github.com/rust-lang/rust/issues/137680 (missing handling of the long suggestion). Fix https://github.com/rust-lang/rust/issues/125581.

---

Change the way that underline positions are calculated by delaying using the "visual" column position until the last possible moment, instead using the "file"/byte position in the file, and then calculating visual positioning as late as possible. This should make the underlines more resilient to non-1-width unicode chars.

Unfortunately, as part of this change (which fixes some visual bugs) comes with the loss of some eager tab codepoint handling, but the output remains legible despite some minor regression on the "margin trimming" logic.

---

`-Zteach` is perma-unstable, barely used, the highlighting logic buggy and the flag being passed around is tech-debt. We should likely remove `-Zteach` in its entirely.
2025-03-08 01:27:22 -05:00
..
assembly Rollup merge of #137957 - Noratrieb:no, r=wesleywiser 2025-03-07 21:57:50 -05:00
auxiliary tests: use minicore more 2025-02-24 09:26:54 +00:00
codegen Rollup merge of #138073 - tmiasko:inline-asm-critical-edges, r=bjorn3 2025-03-07 10:12:46 +01:00
codegen-units Remove -Zinline-in-all-cgus and clean up CGU partitioning tests 2025-01-27 23:48:47 -05:00
coverage coverage: Add some more cases to tests/coverage/holes.rs 2025-02-19 13:56:20 +11:00
coverage-run-rustdoc
crashes Make synthetic RPITIT assoc ty name handling more rigorous. 2025-03-07 20:59:45 +11:00
debuginfo Delete tuple unsizing 2025-02-27 10:26:33 +00:00
incremental remove most simd_ intrinsic declaration in tests 2025-02-27 12:22:59 +01:00
mir-opt Rollup merge of #137904 - scottmcm:ordering-is, r=workingjubilee 2025-03-07 10:02:26 +01:00
pretty Implement &pin const self and &pin mut self sugars 2025-03-05 22:37:53 +08:00
run-make Fix broken-pipe-no-ice to not depend on unstable anonymous_pipe feature 2025-03-07 19:08:11 +08:00
rustdoc Rollup merge of #137764 - compiler-errors:always-applicable-negative-impl, r=lcnr 2025-03-06 12:22:16 -05:00
rustdoc-gui Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle 2025-02-25 13:07:34 +01:00
rustdoc-js Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez 2024-12-16 20:00:20 +01:00
rustdoc-js-std Remove the common prelude module 2025-02-11 13:04:27 -08:00
rustdoc-json rustdoc: Add attribute-related tests for rustdoc JSON. 2025-03-05 04:46:14 +00:00
rustdoc-ui Fix rustdoc test 2025-03-07 17:55:08 +00:00
ui Rollup merge of #137757 - estebank:trim-spans, r=davidtwco 2025-03-08 01:27:22 -05:00
ui-fulldeps Rollup merge of #136865 - jieyouxu:long-type-path-compare-mode, r=lqd 2025-03-05 21:46:35 +08:00
COMPILER_TESTS.md