Skip to content

Commit fda473f

Browse files
Add urls in std::io types
1 parent 2bed205 commit fda473f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/libstd/io/error.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ pub type Result<T> = result::Result<T, Error>;
5555
///
5656
/// Errors mostly originate from the underlying OS, but custom instances of
5757
/// `Error` can be created with crafted error messages and a particular value of
58-
/// `ErrorKind`.
58+
/// [`ErrorKind`].
59+
///
60+
/// [`ErrorKind`]: enum.ErrorKind.html
5961
#[derive(Debug)]
6062
#[stable(feature = "rust1", since = "1.0.0")]
6163
pub struct Error {
@@ -77,6 +79,10 @@ struct Custom {
7779
///
7880
/// This list is intended to grow over time and it is not recommended to
7981
/// exhaustively match against it.
82+
///
83+
/// It is used with the [`io::Error`] type.
84+
///
85+
/// [`io::Error`]: struct.Error.html
8086
#[derive(Copy, PartialEq, Eq, Clone, Debug)]
8187
#[stable(feature = "rust1", since = "1.0.0")]
8288
#[allow(deprecated)]

src/libstd/io/mod.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1082,16 +1082,22 @@ pub trait Seek {
10821082
///
10831083
/// If the seek operation completed successfully,
10841084
/// this method returns the new position from the start of the stream.
1085-
/// That position can be used later with `SeekFrom::Start`.
1085+
/// That position can be used later with [`SeekFrom::Start`].
10861086
///
10871087
/// # Errors
10881088
///
10891089
/// Seeking to a negative offset is considered an error.
1090+
///
1091+
/// [`SeekFrom::Start`]: enum.SeekFrom.html#variant.Start
10901092
#[stable(feature = "rust1", since = "1.0.0")]
10911093
fn seek(&mut self, pos: SeekFrom) -> Result<u64>;
10921094
}
10931095

10941096
/// Enumeration of possible methods to seek within an I/O object.
1097+
///
1098+
/// It is used by the [`Seek`] trait.
1099+
///
1100+
/// [`Seek`]: trait.Seek.html
10951101
#[derive(Copy, PartialEq, Eq, Clone, Debug)]
10961102
#[stable(feature = "rust1", since = "1.0.0")]
10971103
pub enum SeekFrom {

0 commit comments

Comments
 (0)