diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-07-30 13:37:52 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-07-30 13:38:04 +0200 |
| commit | fda473f00fa07b9a8246b104396f9922e54bff16 (patch) | |
| tree | 296b391f2a2b15cc7df10092ae60826ec6aa2987 /src/libstd | |
| parent | 2bed205d3be05682b84693edeed4d84d850eb801 (diff) | |
| download | rust-fda473f00fa07b9a8246b104396f9922e54bff16.tar.gz rust-fda473f00fa07b9a8246b104396f9922e54bff16.zip | |
Add urls in std::io types
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/error.rs | 8 | ||||
| -rw-r--r-- | src/libstd/io/mod.rs | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index 63016a1a795..5333b0a531e 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -55,7 +55,9 @@ pub type Result<T> = result::Result<T, Error>; /// /// Errors mostly originate from the underlying OS, but custom instances of /// `Error` can be created with crafted error messages and a particular value of -/// `ErrorKind`. +/// [`ErrorKind`]. +/// +/// [`ErrorKind`]: enum.ErrorKind.html #[derive(Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub struct Error { @@ -77,6 +79,10 @@ struct Custom { /// /// This list is intended to grow over time and it is not recommended to /// exhaustively match against it. +/// +/// It is used with the [`io::Error`] type. +/// +/// [`io::Error`]: struct.Error.html #[derive(Copy, PartialEq, Eq, Clone, Debug)] #[stable(feature = "rust1", since = "1.0.0")] #[allow(deprecated)] diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 3d1ee5b7ae7..88fd4186e0a 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -1082,16 +1082,22 @@ pub trait Seek { /// /// If the seek operation completed successfully, /// this method returns the new position from the start of the stream. - /// That position can be used later with `SeekFrom::Start`. + /// That position can be used later with [`SeekFrom::Start`]. /// /// # Errors /// /// Seeking to a negative offset is considered an error. + /// + /// [`SeekFrom::Start`]: enum.SeekFrom.html#variant.Start #[stable(feature = "rust1", since = "1.0.0")] fn seek(&mut self, pos: SeekFrom) -> Result<u64>; } /// Enumeration of possible methods to seek within an I/O object. +/// +/// It is used by the [`Seek`] trait. +/// +/// [`Seek`]: trait.Seek.html #[derive(Copy, PartialEq, Eq, Clone, Debug)] #[stable(feature = "rust1", since = "1.0.0")] pub enum SeekFrom { |
