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
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 .
During cleaning up some of the error handling in paritytech/substrate I encountered that using
#[error("yada {0:?}")]
for something along the lines ofstruct Erroris<T>(pub Wrapper<T>)
does not enforce aT: Debug
bound on the underlying generic type, but requires adding a bound on the struct declaration/definition rather than the generatedfmt::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 ❤️
The text was updated successfully, but these errors were encountered: