]> git.lizzy.rs Git - rust.git/commitdiff
Use wrapping_div call and correct the feature name
authorMathijs van de Nes <git@mathijs.vd-nes.nl>
Wed, 8 Jul 2015 13:44:50 +0000 (15:44 +0200)
committerMathijs van de Nes <git@mathijs.vd-nes.nl>
Wed, 8 Jul 2015 13:44:50 +0000 (15:44 +0200)
src/libcore/num/wrapping.rs

index 1636a1e2703f23970d7a35cfb7bd9bcbb433b336..2e3b34af51382483ec3975b6a2b07fb3c5e1301d 100644 (file)
@@ -119,13 +119,13 @@ fn mul(self, other: Wrapping<$t>) -> Wrapping<$t> {
             }
         }
 
-        #[stable(feature = "rust1", since = "1.3.0")]
+        #[stable(feature = "wrapping_div", since = "1.3.0")]
         impl Div for Wrapping<$t> {
             type Output = Wrapping<$t>;
 
             #[inline(always)]
             fn div(self, other: Wrapping<$t>) -> Wrapping<$t> {
-                Wrapping(self.0 / other.0)
+                Wrapping(self.0.wrapping_div(other.0))
             }
         }