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

Use Spans to report better error locations #612

Closed
wants to merge 9 commits into from
Closed

Use Spans to report better error locations #612

wants to merge 9 commits into from

Conversation

Kijewski
Copy link
Contributor

This PR might look huge and incomprehensible, but it actually shouldn't be too difficult to read. I hope.

Currently if the parsing fails, an error in #[derive(Template)] is reported, even though the library knows a more narrow location, e.g. at least that the error is actually in #[template(…)], or in the path = "…" argument if the file is absent.

This PR is also done in anticipation of rust-lang/rfcs#3200, which might make it possible to report an error location in the actual template file; and #600, which adds multiple files as possible template file source of an error.

@Kijewski Kijewski closed this Jul 20, 2022
@Kijewski Kijewski deleted the pr-compile-errors-with-spans branch July 20, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants