about summary refs log tree commit diff
path: root/src/libstd/net
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-06 18:52:18 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-07 17:54:34 -0700
commitba402312fed8134a9919bbb79bcd9978b92e4dee (patch)
tree632e99d9adc3ca92950a86f1b4ba97426057bfce /src/libstd/net
parent179719d45023e549a62ec7a584d554408c6d241d (diff)
downloadrust-ba402312fed8134a9919bbb79bcd9978b92e4dee.tar.gz
rust-ba402312fed8134a9919bbb79bcd9978b92e4dee.zip
std: Deny most warnings in doctests
Allow a few specific ones but otherwise this helps ensure that our examples are
squeaky clean!

Closes #18199
Diffstat (limited to 'src/libstd/net')
-rw-r--r--src/libstd/net/addr.rs3
-rw-r--r--src/libstd/net/tcp.rs2
-rw-r--r--src/libstd/net/udp.rs1
3 files changed, 1 insertions, 5 deletions
diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs
index 886f252fb19..3abf805c7f6 100644
--- a/src/libstd/net/addr.rs
+++ b/src/libstd/net/addr.rs
@@ -281,7 +281,6 @@ impl hash::Hash for SocketAddrV6 {
 /// Some examples:
 ///
 /// ```no_run
-/// # #![feature(net)]
 /// use std::net::{SocketAddrV4, TcpStream, UdpSocket, TcpListener, Ipv4Addr};
 ///
 /// fn main() {
@@ -302,7 +301,7 @@ impl hash::Hash for SocketAddrV6 {
 ///     let tcp_l = TcpListener::bind("localhost:12345");
 ///
 ///     let mut udp_s = UdpSocket::bind(("127.0.0.1", port)).unwrap();
-///     udp_s.send_to(&[7], (ip, 23451));
+///     udp_s.send_to(&[7], (ip, 23451)).unwrap();
 /// }
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs
index 04d1013af1f..2da6f7420ac 100644
--- a/src/libstd/net/tcp.rs
+++ b/src/libstd/net/tcp.rs
@@ -27,7 +27,6 @@ use sys_common::{AsInner, FromInner};
 /// # Examples
 ///
 /// ```no_run
-/// # #![feature(net)]
 /// use std::io::prelude::*;
 /// use std::net::TcpStream;
 ///
@@ -47,7 +46,6 @@ pub struct TcpStream(net_imp::TcpStream);
 /// # Examples
 ///
 /// ```no_run
-/// # #![feature(net)]
 /// use std::net::{TcpListener, TcpStream};
 /// use std::thread;
 ///
diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs
index 7b14e4dbea6..bec9c09bc31 100644
--- a/src/libstd/net/udp.rs
+++ b/src/libstd/net/udp.rs
@@ -27,7 +27,6 @@ use sys_common::{AsInner, FromInner};
 /// # Examples
 ///
 /// ```no_run
-/// # #![feature(net)]
 /// use std::net::UdpSocket;
 ///
 /// # fn foo() -> std::io::Result<()> {