Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix panic in annotated_snippet dependency (GitHub issue #4968).
* Internally, rustfmt preserves tabs and counts them as multiple characters (based on configuration). * The annoted_snippet dependency counts tabs as 1 character. * If rustfmt produces an error on a line containing tabs, annotated_snippet may think that the error is out of range and panic. * Have rustfmt internally replace tabs with the corresponding number of spaces, so that columns can be counted unambiguously. * This change is based on PR #5039 by karyon, but with the code review suggestions by camsteffen.
- Loading branch information