Skip to content

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

@asterite

Description

@asterite

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions