[rust-dev] std::num::pow() is inadequate / language concepts

Sean McArthur smcarthur at mozilla.com
Fri Jul 25 13:59:49 PDT 2014

On Fri, Jul 25, 2014 at 1:45 PM, Gregor Cramer <remarcg at gmx.net> wrote:

>  How you are doing this? I'm in fact a newbie in Rust, and it's
> interesting
> that this can be done. std::num::pow() is a good example, I think.
> Suppose I already have a program which is using std::num::pow() with a
> self defined integer type. Now you are changing std::num::pow(), moving
> the functionality into a trait. And my program will still compile and work
> as before?

I'd expect that std::num::pow() would gain a #[deprecated = "Use Pow
trait"] attribute, and be removed after Rust's deprecation period (which
pre-1.0 is pretty much a few commits later).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140725/1eb368ae/attachment.html>

More information about the Rust-dev mailing list