Rollup merge of #35175 - frewsxcv:tcp, r=GuillaumeGomez

A couple `std::net` doc improvements.

None
This commit is contained in:
Guillaume Gomez 2016-08-05 16:12:54 +02:00 committed by GitHub
commit e377049262
2 changed files with 10 additions and 1 deletions

View file

@ -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 {

View file

@ -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 }