Add Diagnostic
object for lint emissions
#47
Labels
A-api
Area: Stable API
C-enhancement
Category: New feature or request
E-help-wanted
Participation: Issues with some complexity and where help would be highly appreciated
Milestone
The error messages of Rust are remarkable, creating them can be challenging, though. Rustc uses a
Diagnostic
struct and aDiagnosticBuilder
to create these messages. For this project, I'd like to have something similar.Things to keep in mind:
The
Diagnostic
object has to be FFI safe (Maybe it can first useVec
during construction and then swap to an FFI safe diagnostic)The information of the
Diagnostic
backend should be the common denominator off all backends as it kind of dictates, what each backend has to provide as a lint emission mechanism.Rust-analyzer supports rustc's diagnostic structure AFAIK, so it's most likely safe to take that as a rough example.
And probably plenty of other things I can't think of rn.
The text was updated successfully, but these errors were encountered: