rust-num / num-traits

Numeric traits for generic mathematics in Rust
Apache License 2.0
731 stars 135 forks source link

Methods to_usize() etc should be const-fn #82

Closed Boscop closed 6 years ago

Boscop commented 6 years ago

The methods [to_usize()](Methods to_usize() etc should be const-fn) etc should be const-fn.

Boscop commented 6 years ago

Nevermind, trait fns cannot be declared const :/

PTaylor-us commented 4 years ago

On nightly, one can impl const Trait for T. Perhaps something like that could be used.

I'm going to play around with it and see what the possibilities are.

PTaylor-us commented 4 years ago

I'm not having a huge amount of success. Here's where I'm at: playground