Files
rust/tests/ui/parser
Matthias Krüger 4209a4661a Rollup merge of #147165 - Muscraft:subtract-code-offset, r=davidtwco
test: Subtract code_offset from width for ui_testing

`annotate-snippets` does not have a "UI test" mode like `rustc`, [where the code offset is not subtracted from the column width](f34ba774c7/compiler/rustc_errors/src/emitter.rs (L1985-L1987)). This makes it so `annotate-snippets` will shift the output for some very long tests 5 - 7 columns to the left. As part of my work to have `rustc` use `annotate-snippets`, and to reduce the test differences between the two, I figured it would be best if `rustc` started subtracting the code offset from the width as well.

The first commit exists to keep the test output changes of adding a new line to a test separate from adding the `--diagnostic-width` flag in the second commit. This makes it easier to verify that adding the flag does not affect the test's output.

[Zulip discussion](https://rust-lang.zulipchat.com/#narrow/channel/147480-t-compiler.2Fdiagnostics/topic/annotate-snippets.20hurdles)
2025-10-07 07:04:17 +02:00
..
2025-04-03 21:41:58 +00:00
2025-08-22 08:58:45 +02:00
2024-12-10 11:34:13 +08:00
2025-08-28 20:05:04 +02:00
2025-08-28 20:05:04 +02:00
2025-07-25 20:38:54 +05:00
2024-11-16 20:03:31 +00:00
2025-07-31 21:25:49 +05:00
2025-09-15 10:48:26 -07:00
2024-10-11 11:30:08 -04:00
2025-08-09 16:27:20 +05:00
2024-11-29 06:10:15 +11:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2025-01-07 16:04:14 +01:00
2025-01-07 16:04:14 +01:00
2025-10-01 22:45:16 +02:00
2025-07-01 15:29:29 +05:00
2025-04-25 17:02:59 +05:00
2024-11-24 19:42:33 +01:00
2024-11-24 19:42:33 +01:00
2024-09-21 20:07:52 +03:00