rust-lang / rust-lang/rust-clippy
Lint `*Error` types that don't implement `std::error::Error`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
I think it would be useful to warn when a type named SomeError does not implement the std::error::Error trait. This is a common annoyance I see in many crates, which leads to the defined error type not being very useful since you can't use it like other error types (you also possibly can't print it if it doesn't impl Display, which is a supertrait of Error).
Contributor guide
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, tests, or entry points are named in the issue. Start by locating existing rust-clippy lints that inspect trait implementations, then determine how a lint could identify types named *Error; done means such types are warned about when they do not implement std::error::Error, with the relevant lint tests and documentation updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100