You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrapping<T> is a bit sorry-looking right now. let foo: Wrapping<u8> = 3; and Wrapping(1) + 1 are type errors, rather than assigning foo the value Wrapping(3) and having the value Wrapping(2) as I expected. You can't even print them.
use std::num::Wrapping;fnmain(){let x:Wrapping<u8> = Wrapping(47);println!("{}", x);}
I asked in #rust and the consensus was the arithmetic is a little more controversial because of the potential for a combinatoric explosion of impls, but that std::fmt's fun toys are low-effort high-awesome and so warrant filing an issue.