You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jonas-schievink opened this issue
Oct 23, 2016
· 2 comments
· May be fixed by #14291
Labels
A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying types
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).
The text was updated successfully, but these errors were encountered:
mcarton
added
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
T-middle
Type: Probably requires verifiying types
A-lint
Area: New lints
labels
Oct 23, 2016
Additionally, we could lint this for types which are used for associated Error and Err types on traits. For example, someone might have an error type called BadValue and use type Err = BadValue on a FromStr impl, and we'd still want to catch that too.
A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.T-middleType: Probably requires verifiying types
I think it would be useful to warn when a type named
SomeError
does not implement thestd::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 implDisplay
, which is a supertrait ofError
).The text was updated successfully, but these errors were encountered: