aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/net/mod.rs
diff options
context:
space:
mode:
authorFenrirWolf <[email protected]>2018-04-21 16:39:03 -0600
committerGitHub <[email protected]>2018-04-21 16:39:03 -0600
commit159b5b9e62ce074bbbd1900137670a9f5426a8bd (patch)
tree4fecd0ca00b754c494e96b13e9837db48de93109 /ctr-std/src/net/mod.rs
parentMove more implementation details to `imp` module (diff)
parentUpdate for Rust nightly 2018-04-19 (diff)
downloadarchived-ctru-rs-159b5b9e62ce074bbbd1900137670a9f5426a8bd.tar.xz
archived-ctru-rs-159b5b9e62ce074bbbd1900137670a9f5426a8bd.zip
Merge pull request #64 from FenrirWolf/nightly-update
Update for Rust nightly 2018-04-19
Diffstat (limited to 'ctr-std/src/net/mod.rs')
-rw-r--r--ctr-std/src/net/mod.rs17
1 files changed, 12 insertions, 5 deletions
diff --git a/ctr-std/src/net/mod.rs b/ctr-std/src/net/mod.rs
index 9fcb93e..b0d5e56 100644
--- a/ctr-std/src/net/mod.rs
+++ b/ctr-std/src/net/mod.rs
@@ -134,12 +134,15 @@ fn each_addr<A: ToSocketAddrs, F, T>(addr: A, mut f: F) -> io::Result<T>
iterator and returning socket \
addresses",
issue = "27705")]
+#[rustc_deprecated(since = "1.25.0", reason = "Use the ToSocketAddrs trait instead")]
pub struct LookupHost(net_imp::LookupHost);
#[unstable(feature = "lookup_host", reason = "unsure about the returned \
iterator and returning socket \
addresses",
issue = "27705")]
+#[rustc_deprecated(since = "1.25.0", reason = "Use the ToSocketAddrs trait instead")]
+#[allow(deprecated)]
impl Iterator for LookupHost {
type Item = SocketAddr;
fn next(&mut self) -> Option<SocketAddr> { self.0.next() }
@@ -149,6 +152,8 @@ impl Iterator for LookupHost {
iterator and returning socket \
addresses",
issue = "27705")]
+#[rustc_deprecated(since = "1.25.0", reason = "Use the ToSocketAddrs trait instead")]
+#[allow(deprecated)]
impl fmt::Debug for LookupHost {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.pad("LookupHost { .. }")
@@ -170,17 +175,19 @@ impl fmt::Debug for LookupHost {
///
/// use std::net;
///
-/// # fn foo() -> std::io::Result<()> {
-/// for host in net::lookup_host("rust-lang.org")? {
-/// println!("found address: {}", host);
+/// fn main() -> std::io::Result<()> {
+/// for host in net::lookup_host("rust-lang.org")? {
+/// println!("found address: {}", host);
+/// }
+/// Ok(())
/// }
-/// # Ok(())
-/// # }
/// ```
#[unstable(feature = "lookup_host", reason = "unsure about the returned \
iterator and returning socket \
addresses",
issue = "27705")]
+#[rustc_deprecated(since = "1.25.0", reason = "Use the ToSocketAddrs trait instead")]
+#[allow(deprecated)]
pub fn lookup_host(host: &str) -> io::Result<LookupHost> {
net_imp::lookup_host(host).map(LookupHost)
}