RustCrypto / RustCrypto/traits
Use `diagnostic::on_unimplemented` to improve blanket impl debugging
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 755
- Forks
- 256
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 2
Description
Rust 1.78 added a new diagnostic::on_unimplemented attribute which can be used to add additional context in the event a trait isn't impl'd in the form of note messages that appear in the diagnostics:
https://rust-lang.github.io/rfcs/3368-diagnostic-attribute-namespace.html#guide-level-explanation
These seem very helpful for improving debugging of missing trait impls which are expected to be received via a blanket impl, i.e. the note can include the name of the other trait the user is expected to implement.
It will be awhile before we can consider Rust 1.78, however I thought I'd go ahead and open this as a tracking / planning issue for using this feature.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reading the linked Rust RFC and searching the repository for blanket implementations whose missing-trait diagnostics could explain the expected trait. Done should be a scoped decision about where to apply on_unimplemented and what diagnostic notes each case should provide.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100