about summary refs log tree commit diff
path: root/src/libstd/sys/unix
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-03-31 14:50:46 +0000
committerbors <bors@rust-lang.org>2015-03-31 14:50:46 +0000
commit80bf31dd514055177b22c3dc66836d39eb5b1648 (patch)
treecd6181ba8612c9233c3a47aaf5e956a5610c348e /src/libstd/sys/unix
parentb3317d68910900f135f9f38e43a7a699bc736b4a (diff)
parent232424d9952700682373ccf2d578109f401ff023 (diff)
downloadrust-80bf31dd514055177b22c3dc66836d39eb5b1648.tar.gz
rust-80bf31dd514055177b22c3dc66836d39eb5b1648.zip
Auto merge of #23549 - aturon:stab-num, r=alexcrichton
This commit stabilizes the `std::num` module:

* The `Int` and `Float` traits are deprecated in favor of (1) the
  newly-added inherent methods and (2) the generic traits available in
  rust-lang/num.

* The `Zero` and `One` traits are reintroduced in `std::num`, which
  together with various other traits allow you to recover the most
  common forms of generic programming.

* The `FromStrRadix` trait, and associated free function, is deprecated
  in favor of inherent implementations.

* A wide range of methods and constants for both integers and floating
  point numbers are now `#[stable]`, having been adjusted for integer
  guidelines.

* `is_positive` and `is_negative` are renamed to `is_sign_positive` and
  `is_sign_negative`, in order to address #22985

* The `Wrapping` type is moved to `std::num` and stabilized;
  `WrappingOps` is deprecated in favor of inherent methods on the
  integer types, and direct implementation of operations on
  `Wrapping<X>` for each concrete integer type `X`.

Closes #22985
Closes #21069

[breaking-change]

r? @alexcrichton 
Diffstat (limited to 'src/libstd/sys/unix')
-rw-r--r--src/libstd/sys/unix/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs
index 5555eec4f39..e8409bb4fd4 100644
--- a/src/libstd/sys/unix/mod.rs
+++ b/src/libstd/sys/unix/mod.rs
@@ -171,6 +171,7 @@ pub fn retry<T, F> (mut f: F) -> T where
     }
 }
 
+#[allow(deprecated)]
 pub fn cvt<T: SignedInt>(t: T) -> io::Result<T> {
     let one: T = Int::one();
     if t == -one {
@@ -180,6 +181,7 @@ pub fn cvt<T: SignedInt>(t: T) -> io::Result<T> {
     }
 }
 
+#[allow(deprecated)]
 pub fn cvt_r<T, F>(mut f: F) -> io::Result<T>
     where T: SignedInt, F: FnMut() -> T
 {