about summary refs log tree commit diff
path: root/src/libstd/net
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2015-03-19 23:42:18 -0700
committerAaron Turon <aturon@mozilla.com>2015-03-31 07:50:25 -0700
commit232424d9952700682373ccf2d578109f401ff023 (patch)
tree1818492e1eca9d76f4090160fe2c04ea4d28a711 /src/libstd/net
parent14192d6df5cc714e5c9a3ca70b08f2514d977be2 (diff)
downloadrust-232424d9952700682373ccf2d578109f401ff023.tar.gz
rust-232424d9952700682373ccf2d578109f401ff023.zip
Stabilize std::num
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]
Diffstat (limited to 'src/libstd/net')
-rw-r--r--src/libstd/net/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/net/mod.rs b/src/libstd/net/mod.rs
index 68f3098d993..ee57300765e 100644
--- a/src/libstd/net/mod.rs
+++ b/src/libstd/net/mod.rs
@@ -18,6 +18,7 @@
 use prelude::v1::*;
 
 use io::{self, Error, ErrorKind};
+#[allow(deprecated)] // Int
 use num::Int;
 use sys_common::net2 as net_imp;
 
@@ -54,7 +55,9 @@ pub enum Shutdown {
     Both,
 }
 
+#[allow(deprecated)] // Int
 fn hton<I: Int>(i: I) -> I { i.to_be() }
+#[allow(deprecated)] // Int
 fn ntoh<I: Int>(i: I) -> I { Int::from_be(i) }
 
 fn each_addr<A: ToSocketAddrs, F, T>(addr: A, mut f: F) -> io::Result<T>