Commit abee1df
Naseschwarz
Convert error line buffer to space indentation
The type of indentation is not important for error reporting. However,
keeping the indentation as tabs has two issues:
1. rustfmt keeps track of widths, not character offsets. For space
indentation, these two are the same. For tab indentation, this leads
to issues like [1].
2. annotate-snippet-rs always format leading tabs as four spaces. Thus,
formatter error reporting is not faithful and ranges will not be
marked correctly (or need another transformation).
Replacing tabs with spaces for error reporting as early as possible
solves these issues.
[1] #64421 parent ee329d3 commit abee1df
File tree
3 files changed
+20
-1
lines changed- src
- tests
- source
- target
3 files changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
596 | 605 | | |
597 | 606 | | |
598 | 607 | | |
599 | 608 | | |
600 | 609 | | |
601 | 610 | | |
602 | | - | |
| 611 | + | |
603 | 612 | | |
604 | 613 | | |
605 | 614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments