Skip to content
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

Fix incorrect line numbers in error messages #884

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

maximebuyse
Copy link
Contributor

Fixes #879

The crate annotate-snippets that we use for reporting error messages has a parameter line_start that corresponds to the line number of the first line that we pass (the source code is passed as a string in another parameter). In our case we always give the full source code so line_start should be 1 (and not the line number at which the error is located).

Copy link
Collaborator

@jschneider-bensch jschneider-bensch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the docs for annotate_snippet are really a bit sparse. This looks good!

Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!

@franziskuskiefer franziskuskiefer added this pull request to the merge queue Sep 11, 2024
Merged via the queue into main with commit 7727083 Sep 11, 2024
12 of 13 checks passed
@franziskuskiefer franziskuskiefer deleted the fix-879 branch September 11, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Incorrect line numbers in error messages
3 participants