@@ -14,9 +14,7 @@ use fmt;
1414use hash;
1515use io;
1616use mem;
17- use net:: { lookup_host, ntoh, hton, Ipv4Addr , Ipv6Addr } ;
18- #[ allow( deprecated) ]
19- use net:: IpAddr ;
17+ use net:: { lookup_host, ntoh, hton, IpAddr , Ipv4Addr , Ipv6Addr } ;
2018use option;
2119use sys:: net:: netc as c;
2220use sys_common:: { FromInner , AsInner , IntoInner } ;
@@ -50,10 +48,7 @@ pub struct SocketAddrV6 { inner: c::sockaddr_in6 }
5048
5149impl SocketAddr {
5250 /// Creates a new socket address from the (ip, port) pair.
53- #[ unstable( feature = "ip_addr" , reason = "recent addition" , issue = "27801" ) ]
54- #[ rustc_deprecated( reason = "ip type too small a type to pull its weight" ,
55- since = "1.6.0" ) ]
56- #[ allow( deprecated) ]
51+ #[ stable( feature = "ip_addr" , since = "1.7.0" ) ]
5752 pub fn new ( ip : IpAddr , port : u16 ) -> SocketAddr {
5853 match ip {
5954 IpAddr :: V4 ( a) => SocketAddr :: V4 ( SocketAddrV4 :: new ( a, port) ) ,
@@ -62,10 +57,7 @@ impl SocketAddr {
6257 }
6358
6459 /// Returns the IP address associated with this socket address.
65- #[ unstable( feature = "ip_addr" , reason = "recent addition" , issue = "27801" ) ]
66- #[ rustc_deprecated( reason = "too small a type to pull its weight" ,
67- since = "1.6.0" ) ]
68- #[ allow( deprecated) ]
60+ #[ stable( feature = "ip_addr" , since = "1.7.0" ) ]
6961 pub fn ip ( & self ) -> IpAddr {
7062 match * self {
7163 SocketAddr :: V4 ( ref a) => IpAddr :: V4 ( * a. ip ( ) ) ,
@@ -359,7 +351,6 @@ impl ToSocketAddrs for SocketAddrV6 {
359351}
360352
361353#[ stable( feature = "rust1" , since = "1.0.0" ) ]
362- #[ allow( deprecated) ]
363354impl ToSocketAddrs for ( IpAddr , u16 ) {
364355 type Iter = option:: IntoIter < SocketAddr > ;
365356 fn to_socket_addrs ( & self ) -> io:: Result < option:: IntoIter < SocketAddr > > {
0 commit comments