Skip to content

Incorrect span for multiline format string with errors #53836

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

Closed
estebank opened this issue Aug 30, 2018 · 2 comments
Closed

Incorrect span for multiline format string with errors #53836

estebank opened this issue Aug 30, 2018 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@estebank
Copy link
Contributor

Given a multiline format string with an unclosed brace, the inner span to the format string is shifted 1 character to the right for each newline.

Introduced in #52649.

@estebank estebank added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints labels Aug 30, 2018
@johnfercher
Copy link

johnfercher commented Sep 1, 2018

I would like to help with this issue. May someone give me some information about how I can help?

@estebank
Copy link
Contributor Author

estebank commented Sep 1, 2018

@johnfercher I believe one of the uses of seen_newlines should be there, which causes the span to be shifter by one for each newline, possibly this one.

You should modify this file to include the incorrect case in the description, and use ./x.py test src/test/ui --bless to update the corresponding stderr file. You can use git diff to see if the change you made is actually doing what you expect it to do.

euclio added a commit to euclio/rust that referenced this issue Oct 3, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this issue Oct 4, 2018
remove padding from multiline format string label

Fixes rust-lang#53836.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants