Closed
Description
It would be nice to have a (rustc-only) system of that lets us annotate structs with things like #[diagnostic_item="String"]
.
This lets us improve the diagnostics in special cases involving that type (e.g. #39116 (comment)). Clippy currently string-compares the path to do this, but that's hacky and I would rather we avoided that code in rustc.
It's something that would only get hit when we have an error case, so we probably can just store these in a hash map or something.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Category: A feature request, i.e: not implemented / a PR.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.