about summary refs log tree commit diff
path: root/library/std/src/num.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/num.rs')
-rw-r--r--library/std/src/num.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/library/std/src/num.rs b/library/std/src/num.rs
index d2f679e7dde..ffb8789c906 100644
--- a/library/std/src/num.rs
+++ b/library/std/src/num.rs
@@ -6,9 +6,6 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 #![allow(missing_docs)]
 
-#[cfg(test)]
-mod tests;
-
 #[stable(feature = "int_error_matching", since = "1.55.0")]
 pub use core::num::IntErrorKind;
 #[stable(feature = "generic_nonzero", since = "1.79.0")]
@@ -29,28 +26,3 @@ pub use core::num::{FpCategory, ParseFloatError, ParseIntError, TryFromIntError}
 pub use core::num::{NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, NonZeroIsize};
 #[stable(feature = "nonzero", since = "1.28.0")]
 pub use core::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, NonZeroUsize};
-
-#[cfg(test)]
-use crate::fmt;
-#[cfg(test)]
-use crate::ops::{Add, Div, Mul, Rem, Sub};
-
-/// Helper function for testing numeric operations
-#[cfg(test)]
-pub fn test_num<T>(ten: T, two: T)
-where
-    T: PartialEq
-        + Add<Output = T>
-        + Sub<Output = T>
-        + Mul<Output = T>
-        + Div<Output = T>
-        + Rem<Output = T>
-        + fmt::Debug
-        + Copy,
-{
-    assert_eq!(ten.add(two), ten + two);
-    assert_eq!(ten.sub(two), ten - two);
-    assert_eq!(ten.mul(two), ten * two);
-    assert_eq!(ten.div(two), ten / two);
-    assert_eq!(ten.rem(two), ten % two);
-}