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

Let compiler errors always carry a Location instead of a Span #7452

Closed
asterite opened this issue Feb 20, 2025 · 0 comments · Fixed by #7486
Closed

Let compiler errors always carry a Location instead of a Span #7452

asterite opened this issue Feb 20, 2025 · 0 comments · Fixed by #7486
Assignees

Comments

@asterite
Copy link
Collaborator

asterite commented Feb 20, 2025

Once #7333 is merged it would be nice if errors carried Locations instead of Spans. That way Elaborator::push_err would only need to take an error, not a file.

Then, some errors currently hold multiple spans, for example on duplicate errors (a duplication function) and that duplication could happen in different files so moving to Location instead of Span will also produce more correct error messages in some cases.

Additionally, let CustomDiagnostic API work with Location instead of Span, and make CustomLabel hold a Location instead of a Span and an optional FileId.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant