You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, sub-diagnostics are handled by adding Annotation's to Snippet::footer. This system is fine, but it does not support sub-diagnostics with a span. This is needed for rust adoption as Subdiag can have spans.
error[E0000]: main error message
--> file.rs:LL:CC
|
LL | <code>
| -^^^^- secondary label
| |
| primary label
|
= note: note without a `Span`, created with `.note`
note: sub-diagnostic message for `.span_note`
--> file.rs:LL:CC
|
LL | more code
| ^^^^
Since spans need a source, sub-diagnostics should probably need to be moved under Slice or something similar. This does bring up the question of where we should show a sub-diagnostic, at the end of a Snippet, or at the end of source the span is associated with.
The text was updated successfully, but these errors were encountered:
Currently, sub-diagnostics are handled by adding
Annotation
's toSnippet::footer
. This system is fine, but it does not support sub-diagnostics with a span. This is needed forrust
adoption asSubdiag
can have spans.One thing to note is that sub-diagnostics are rendered differently depending on if they have a span or they don't have any.
Since spans need a source, sub-diagnostics should probably need to be moved under
Slice
or something similar. This does bring up the question of where we should show a sub-diagnostic, at the end of aSnippet
, or at the end of source the span is associated with.The text was updated successfully, but these errors were encountered: