diff options
| author | bors <bors@rust-lang.org> | 2016-03-12 13:21:06 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-03-12 13:21:06 -0800 |
| commit | a2c56de7643c3b989c703758f0fb9f426403bca2 (patch) | |
| tree | 6d93e86dd597e0b71632332a141269e6729837ff /src/libstd/sys/common | |
| parent | 8788ffc670e981a195c771ab3c8530c72eb119d7 (diff) | |
| parent | b53764c73bd722ea22142bace6249d5950066253 (diff) | |
| download | rust-a2c56de7643c3b989c703758f0fb9f426403bca2.tar.gz rust-a2c56de7643c3b989c703758f0fb9f426403bca2.zip | |
Auto merge of #32112 - alexcrichton:fix-issues, r=aturon
std: Fix tracking issues and clean deprecated APIs This PR fixes up a number of discrepancies found with tracking issues (some closed, some needed new ones, etc), and also cleans out all pre-1.8 deprecated APIs. The big beast here was dealing with `std::dynamic_lib`, and via many applications of a large hammer it's now out of the standard library.
Diffstat (limited to 'src/libstd/sys/common')
| -rw-r--r-- | src/libstd/sys/common/net.rs | 36 | ||||
| -rw-r--r-- | src/libstd/sys/common/remutex.rs | 3 |
2 files changed, 3 insertions, 36 deletions
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs index aa92e5be114..42714feb921 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -11,15 +11,13 @@ use prelude::v1::*; use cmp; -use ffi::{CStr, CString}; +use ffi::CString; use fmt; use io::{self, Error, ErrorKind}; -use libc::{c_int, c_char, c_void}; +use libc::{c_int, c_void}; use mem; -#[allow(deprecated)] -use net::{SocketAddr, Shutdown, IpAddr, Ipv4Addr, Ipv6Addr}; +use net::{SocketAddr, Shutdown, Ipv4Addr, Ipv6Addr}; use ptr; -use str::from_utf8; use sys::net::{cvt, cvt_r, cvt_gai, Socket, init, wrlen_t}; use sys::net::netc as c; use sys_common::{AsInner, FromInner, IntoInner}; @@ -155,34 +153,6 @@ pub fn lookup_host(host: &str) -> io::Result<LookupHost> { } //////////////////////////////////////////////////////////////////////////////// -// lookup_addr -//////////////////////////////////////////////////////////////////////////////// - -#[allow(deprecated)] -pub fn lookup_addr(addr: &IpAddr) -> io::Result<String> { - init(); - - let saddr = SocketAddr::new(*addr, 0); - let (inner, len) = saddr.into_inner(); - let mut hostbuf = [0 as c_char; c::NI_MAXHOST as usize]; - - let data = unsafe { - try!(cvt_gai(c::getnameinfo(inner, len, - hostbuf.as_mut_ptr(), - c::NI_MAXHOST, - ptr::null_mut(), 0, 0))); - - CStr::from_ptr(hostbuf.as_ptr()) - }; - - match from_utf8(data.to_bytes()) { - Ok(name) => Ok(name.to_owned()), - Err(_) => Err(io::Error::new(io::ErrorKind::Other, - "failed to lookup address information")) - } -} - -//////////////////////////////////////////////////////////////////////////////// // TCP streams //////////////////////////////////////////////////////////////////////////////// diff --git a/src/libstd/sys/common/remutex.rs b/src/libstd/sys/common/remutex.rs index 2e2be63c3cb..1793ad0e445 100644 --- a/src/libstd/sys/common/remutex.rs +++ b/src/libstd/sys/common/remutex.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![unstable(feature = "reentrant_mutex", reason = "new API", - issue = "27738")] - use prelude::v1::*; use fmt; |
