rust-num / num-derive

Procedural macros to derive numeric traits in Rust
Apache License 2.0
166 stars 24 forks source link

Support for `const fn` for `ToPrimitive`? #65

Closed tyrone-wu closed 3 hours ago

tyrone-wu commented 5 hours ago

Hello 👋. awesome crate!

I was wondering if it would be possible have another set of functions implemented from ToPrimitve be marked as const fn to directly return the primitive?

Thank you.

tyrone-wu commented 3 hours ago

Actually, this issue should have been in num-traits. Sorry. 😅