rust/tests/ui/str
Esteban Küber 2d7795dfb9 Be more accurate about calculating `display_col` from a `BytePos`
No longer track "zero-width" chars in `SourceMap`, read directly from the line when calculating the `display_col` of a `BytePos`. Move `char_width` to `rustc_span` and use it from the emitter.

This change allows the following to properly align in terminals (depending on the font, the replaced control codepoints are rendered as 1 or 2 width, on my terminal they are rendered as 1, on VSCode text they are rendered as 2):

```
error: this file contains an unclosed delimiter
  --> $DIR/issue-68629.rs:5:17
   |
LL | ␜␟ts␀![{i
   |       -- unclosed delimiter
   |       |
   |       unclosed delimiter
LL | ␀␀  fn rݻoa>rݻm
   |                ^
```
2024-07-18 20:08:38 +00:00
..
str-array-assignment.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
str-array-assignment.stderr Tweak borrow suggestion 2023-05-08 03:36:30 +00:00
str-as-char.fixed [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
str-as-char.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
str-as-char.stderr review comment: `str` -> string in messages 2024-03-17 23:35:18 +00:00
str-concat-on-double-ref.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
str-concat-on-double-ref.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
str-escape.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
str-escape.stderr Be more accurate about calculating `display_col` from a `BytePos` 2024-07-18 20:08:38 +00:00
str-idx.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
str-idx.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
str-lit-type-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
str-lit-type-mismatch.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
str-mut-idx.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
str-mut-idx.stderr review comment: change wording 2024-02-01 03:31:03 +00:00
str-overrun.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00