-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account for unicode char width when calculating vertical label lines #66552
Comments
I would like to solve this as a first time issue. Best with some pointers where to start :) |
@TheSamsa the code that draws the vertical lines is at rust/src/librustc_errors/emitter.rs Lines 901 to 927 in 3f93ffc
and the one that draws the span labels is right below rust/src/librustc_errors/emitter.rs Lines 949 to 974 in 3f93ffc
I think the error might be using If this is your first time compiling You might also want to wait until the linked PR is merged so you have a test case, unless you wish to come up with a new one (look for a test that has multiple labels in the same span and pad the source to the left with unicode chars on non-1 width). |
Thank you! |
In ui/terminal-width/non-whitespace-trimming-unicode.stderr we account for the visible char width when calculating the label and span positions, but we do not do so for the vertical bar tying them together, causing the following output:
where it should be
(Found during #66539)
The text was updated successfully, but these errors were encountered: