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

Children diagnostics with messages not fully displayed #851

@Xanewok

Description

@Xanewok

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.

e0495_rls
e0495_rustc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions