From ba402312fed8134a9919bbb79bcd9978b92e4dee Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 6 Apr 2015 18:52:18 -0700 Subject: std: Deny most warnings in doctests Allow a few specific ones but otherwise this helps ensure that our examples are squeaky clean! Closes #18199 --- src/libstd/net/addr.rs | 3 +-- src/libstd/net/tcp.rs | 2 -- src/libstd/net/udp.rs | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src/libstd/net') 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<()> { -- cgit 1.4.1-3-g733a5