summary refs log tree commit diff
path: root/src/libstd/num/mod.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-01 23:53:35 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-03 23:43:57 -0800
commit7d8d06f86b48520814596bd5363d2b82bc619774 (patch)
treeeda093ca208286fd8679da8de9f3597b7a024c50 /src/libstd/num/mod.rs
parent470118f3e915cdc8f936aca0640b28a7a3d8dc6c (diff)
downloadrust-7d8d06f86b48520814596bd5363d2b82bc619774.tar.gz
rust-7d8d06f86b48520814596bd5363d2b82bc619774.zip
Remove deprecated functionality
This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.
Diffstat (limited to 'src/libstd/num/mod.rs')
-rw-r--r--src/libstd/num/mod.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs
index 8f21fb0b8b9..c126eb1d6cf 100644
--- a/src/libstd/num/mod.rs
+++ b/src/libstd/num/mod.rs
@@ -21,12 +21,8 @@
 #[cfg(test)] use ops::{Add, Sub, Mul, Div, Rem};
 #[cfg(test)] use kinds::Copy;
 
-pub use core::num::{Num, div_rem, Zero, zero, One, one};
-pub use core::num::{Unsigned, pow, Bounded};
-pub use core::num::{Primitive, Int, SignedInt, UnsignedInt};
+pub use core::num::{Int, SignedInt, UnsignedInt};
 pub use core::num::{cast, FromPrimitive, NumCast, ToPrimitive};
-pub use core::num::{next_power_of_two, is_power_of_two};
-pub use core::num::{checked_next_power_of_two};
 pub use core::num::{from_int, from_i8, from_i16, from_i32, from_i64};
 pub use core::num::{from_uint, from_u8, from_u16, from_u32, from_u64};
 pub use core::num::{from_f32, from_f64};
@@ -118,11 +114,6 @@ pub trait FloatMath: Float {
 
 // DEPRECATED
 
-#[deprecated = "Use `FloatMath::abs_sub`"]
-pub fn abs_sub<T: FloatMath>(x: T, y: T) -> T {
-    x.abs_sub(y)
-}
-
 /// Helper function for testing numeric operations
 #[cfg(test)]
 pub fn test_num<T>(ten: T, two: T) where
@@ -804,7 +795,7 @@ mod bench {
 
     #[bench]
     fn bench_pow_function(b: &mut Bencher) {
-        let v = Vec::from_fn(1024u, |n| n);
+        let v = range(0, 1024u).collect::<Vec<_>>();
         b.iter(|| {v.iter().fold(0u, |old, new| old.pow(*new));});
     }
 }