Files
rust/tests/ui/async-await
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-08-20 11:10:38 +02:00
2025-07-15 16:02:26 +00:00
2024-12-13 00:04:56 +00:00
2024-12-13 00:04:56 +00:00
2024-01-13 12:46:58 -05:00
2024-10-12 06:14:46 -04:00
2024-10-12 06:14:46 -04:00
2024-12-05 14:14:17 -08:00
2024-12-05 14:14:17 -08:00
2025-08-20 11:10:38 +02:00
2025-08-20 11:10:38 +02:00
2025-04-03 21:41:58 +00:00