- Make
Float
work withno_std
-- thanks @vkahl! - Emit full paths for
Option
andResult
. - Add derive macro for
num_traits::Signed
andUnsigned
-- thanks @tdelabro!
- Update to syn-2 -- thanks @maurer!
- This raises the minimum supported rustc to 1.56.
- The "full-syntax" feature has also been removed.
- Make
NumOps
work withno_std
-- thanks @jedrzejboczar!
- Add
#[inline]
to all derived functions -- thanks @Amanieu!
- Add
num_traits
proc_macro helper for explicit import - thanks @jean-airoldie! - Provide nicer parse errors and suggest "full-syntax"
- Updated the
proc-macro2
,quote
, andsyn
dependencies to 1.0, which raises the minimum supported rustc to 1.31.
- Added newtype deriving for
FromPrimitive
,ToPrimitive
,NumOps<Self, Self>
,NumCast
,Zero
,One
,Num
, andFloat
. Thanks @asayers!
- Updated dependencies -- thanks @spearman!
- Discriminant matching is now simplified, casting values directly by name, rather than trying to compute offsets from known values manually.
- breaking change: Derivations now import the traits from
num-traits
instead of the fullnum
crate. These are still compatible, but users need to have an explicitnum-traits = "0.2"
dependency in theirCargo.toml
.
- The derived code now explicitly allows
unused_qualifications
, so users that globally deny that lint don't encounter an error.
- The derived code now explicitly allows
trivial_numeric_casts
, so users that globally deny that lint don't encounter an error.
- num-derive now has its own source repository at rust-num/num-derive.
- The derivation macros have been updated to using
syn
0.12. Support for complex expressions in enum values can be enabled with thefull-syntax
feature.
Thanks to @cuviper and @hcpl for their contributions!
No prior release notes were kept. Thanks all the same to the many contributors that have made this crate what it is!