]> git.lizzy.rs Git - rust.git/commitdiff
Add urls in std::io types
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Sat, 30 Jul 2016 11:37:52 +0000 (13:37 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Sat, 30 Jul 2016 11:38:04 +0000 (13:38 +0200)
src/libstd/io/error.rs
src/libstd/io/mod.rs

index 63016a1a7959445c32bae3b89b8836a09725d8f4..5333b0a531eaebd671245e8081c71a4cb72cc028 100644 (file)
@@ -55,7 +55,9 @@
 ///
 /// 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)]
index 3d1ee5b7ae7c98c84eccc8b93ee9513981de693f..88fd4186e0a2a73be02e98964f822de8c46c692d 100644 (file)
@@ -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 {