Closed
Description
On E0308 type mismatch errors we already perform a basic check to type arguments in order to only highlight differences between the expected and found type. I recently came across a case where the two types had identifiers of the same length with no type arguments, but that were not local so the path was quite long. It took me some time to realize that the two types were actually different and not caused by different crate versions. It'd be nice if for the following, only the parts of the path that differ were highlighted/bolded in the CLI output:
expected: foo::bar::Baz
found: foo::bar::Bar
^^^ should highlight only this area
CC #43354
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Diagnostics: An error or lint that needs small tweaks.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.