Sourced from derive_more's releases.
2.1.0
Added
- Support
#[display(rename_all = "<casing>")]attribute to change output for implicit naming of unit enum variants or unit structs when derivingDisplay. (#443)- Support
#[from_str(rename_all = "<casing>")]attribute for unit enum variants and unit structs when derivingFromStr. (#467)- Support
Optionfields forError::source()inErrorderive. (#459)- Support structs with no fields in
FromStrderive. (#469)- Add
PartialEqderive similar tostd's one, but considering generics correctly, and implementingne()method as well. (#473, #475)- Add
Eqderive similar tostd's one, but considering generics correctly. (#479)- Proxy-pass
#[allow]/#[expect]attributes of the type inConstructorderive. (#477)- Support
DerefandDerefMutderives for enums. (#485)- Support custom error in
FromStrderive. (#494)- Support custom error in
TryIntoderive. (#503)- Support skipping fields in
Add-like,AddAssign-like,Mul-like andMulAssign-like derives. (#472)Changed
- The minimum supported Rust version (MSRV) is now Rust 1.81. (#466)
Add-like,AddAssign-like,Mul-like andMulAssign-like derives now infer trait bounds for generics structurally (bound field types instead of type parameters directly). (#472)Fixed
- Suppress deprecation warnings in generated code. (#454)
- Silent no-op when
#[try_from(repr)]attribute is not specified forTryFromderive. (#458)- Missing trait bounds in
AsRef/AsMutderives when associative types are involved. (#474)- Erroneous code generated in
Try/TryIntoderives whenSelftype is present in the struct or enum definition. (#489)- Dependency on unstable
feature(error_generic_member_access)inErrorderive when usingBacktraceon a non-nightly toolchain. (#513)- Broken support for
#[<display-trait>("default formatting")]attribute without{_variant}being used as default for enum variants without explicit formatting. (#495)New Contributors
@jaslmade their first contribution in JelteF/derive_more#453@aborgna-qmade their first contribution in JelteF/derive_more#454@maxime-brunomade their first contribution in JelteF/derive_more#461@Cheban1996made their first contribution in JelteF/derive_more#477@kiendangmade their first contribution in JelteF/derive_more#486@goldlinkermade their first contribution in JelteF/derive_more#509@CJKaymade their first contribution in JelteF/derive_more#513@ErmitaVulpemade their first contribution in JelteF/derive_more#472Full Changelog: https://github.com/JelteF/derive_more/compare/v2.0.1...v2.1.0
Sourced from derive_more's changelog.
2.1.0 - 2025-12-02
Added
- Support
#[display(rename_all = "<casing>")]attribute to change output for implicit naming of unit enum variants or unit structs when derivingDisplay. (#443)- Support
#[from_str(rename_all = "<casing>")]attribute for unit enum variants and unit structs when derivingFromStr. (#467)- Support
Optionfields forError::source()inErrorderive. (#459)- Support structs with no fields in
FromStrderive. (#469)- Add
PartialEqderive similar tostd's one, but considering generics correctly, and implementingne()method as well. (#473, #475)- Add
Eqderive similar tostd's one, but considering generics correctly. (#479)- Proxy-pass
#[allow]/#[expect]attributes of the type inConstructorderive. (#477)- Support
DerefandDerefMutderives for enums. (#485)- Support custom error in
FromStrderive. (#494)- Support custom error in
TryIntoderive. (#503)- Support skipping fields in
Add-like,AddAssign-like,Mul-like andMulAssign-like derives. (#472)Changed
- The minimum supported Rust version (MSRV) is now Rust 1.81. (#466)
Add-like,AddAssign-like,Mul-like andMulAssign-like derives now infer trait bounds for generics structurally (bound field types instead of type parameters directly). (#472)Fixed
- Suppress deprecation warnings in generated code. (#454)
- Silent no-op when
#[try_from(repr)]attribute is not specified forTryFromderive. (#458)- Missing trait bounds in
AsRef/AsMutderives when associative types are involved. (#474)- Erroneous code generated in
Try/TryIntoderives whenSelftype is present in
... (truncated)
c354bad
Prepare 2.1.0 release (#521)983875f
Allow using enum-level attributes for non-Display
formatting traits as defa...2d3805b
Allow skipping fields for
Add/AddAssign/Mul/MulAssign-like
derives (#...1b5d314
Upgrade convert_case requirement from 0.9 to 0.10 version
(#520)c32d0a0
Upgrade actions/checkout from 5 to 6 version (#519)905f5a3
Upgrade convert_case crate from 0.8 to 0.9 version (#517)8e9104d
Support syn::ExprCall and syn::ExprClosure for
custom errors (#516,
#112)be3edc4
Update compile_fail tests for 1.91 Rust (#515)929dd41
Support custom error type in TryInto derive (#503,
#396)4fc6827
Remove unstable feature requirement when deriving
Backtraced Error (#513,...