rust-lang / rust-lang/rust-clippy

Lint `*Error` types that don't implement `std::error::Error`

Open
#1,291 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-lint E-medium T-middle
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.