-
-
Notifications
You must be signed in to change notification settings - Fork 203
Closed
Description
During cleaning up some of the error handling in paritytech/substrate I encountered that using #[error("yada {0:?}")] for something along the lines of struct Erroris<T>(pub Wrapper<T>) does not enforce a T: Debug bound on the underlying generic type, but requires adding a bound on the struct declaration/definition rather than the generated fmt::Debug impl. That goes against what is stated as a best practice in the future proofing guide https://rust-lang.github.io/api-guidelines/future-proofing.html?#data-structures-do-not-duplicate-derived-trait-bounds-c-struct-bounds .
paritytech/substrate#7631 (comment)
It would be awesome if this could be addressed ❤️
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels