From 57e3b9eb713f44a9dce97be5840c536bd7a86069 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Mon, 1 Aug 2016 20:16:56 -0400 Subject: [PATCH 1/2] Indicate where the `std::net::Incoming` struct is created. --- src/libstd/net/tcp.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index 5ab0d5a0877b7..76617f159707d 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -77,6 +77,11 @@ pub struct TcpListener(net_imp::TcpListener); /// /// This iterator will infinitely yield `Some` of the accepted connections. It /// is equivalent to calling `accept` in a loop. +/// +/// This `struct` is created by the [`incoming`] method on [`TcpListener`]. +/// +/// [`incoming`]: struct.TcpListener.html#method.incoming +/// [`TcpListener`]: struct.TcpListener.html #[stable(feature = "rust1", since = "1.0.0")] pub struct Incoming<'a> { listener: &'a TcpListener } From f2d8db15dfe9b715f0e0a957440d79945270a20f Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Mon, 1 Aug 2016 20:21:08 -0400 Subject: [PATCH 2/2] Link to relevant method/struct for `std::net::Shutdown` docs. --- src/libstd/net/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libstd/net/mod.rs b/src/libstd/net/mod.rs index ac13b23ebee50..11a16b271133b 100644 --- a/src/libstd/net/mod.rs +++ b/src/libstd/net/mod.rs @@ -35,7 +35,11 @@ mod udp; mod parser; #[cfg(test)] mod test; -/// Possible values which can be passed to the `shutdown` method of `TcpStream`. +/// Possible values which can be passed to the [`shutdown`] method of +/// [`TcpStream`]. +/// +/// [`shutdown`]: struct.TcpStream.html#method.shutdown +/// [`TcpStream`]: struct.TcpStream.html #[derive(Copy, Clone, PartialEq, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub enum Shutdown {