This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Description
Diagnostics emitted by rustc are very flexible and can contain associated messages and spans.
Currently the emitted JSON format consists of the primary diagnostic, possibly having multiple spans, which can also contain labels, but also children/secondary diagnostics, each having its main message and multiple spans, just like the primary diagnostic.
Currently the spans are all flattened and LSP diagnostics are created for them if they have labels, however that doesn't work for E0495. These consist of children diagnostics with a specified message and a single span, which does not have a label. This means that we don't create separate diagnostics and the children messages are ignored.


Ideally, in this case these should be treated just as spans with labels, for which we emit additional diagnostic, and for which notes should not be included in the main message.