Skip to content

Multi-span reporting feature #28124

Closed
@llogiq

Description

@llogiq

For some lints, the user experience would be greatly enhanced if we could report a span with multiple highlights. E.g. in a unicode lint, we currently report every matching unicode sequence within a string, which can be very verbose.

To reduce the clutter, it would be great if we could somehow advise rustc to report the string once, but highlight a given list of spans within the string. For example, this could look like:

uni.rs:5:20: "This string contàìns multìple non nfc sequenc̀es."
                              ^^       ^                  ^

Similarly, this feature could be used with a good number of other error message to get more compact, readable output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions