Skip to content

Commit dad8e11

Browse files
committed
Fix nits in intra-doc links for std io
1 parent 5d49c0e commit dad8e11

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

library/std/src/io/mod.rs

+22-22
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,11 @@ where
479479
/// }
480480
/// ```
481481
///
482-
/// [`read()`]: Self::read
482+
/// [`read()`]: Read::read
483483
/// [`&str`]: str
484484
/// [`std::io`]: self
485485
/// [`File`]: crate::fs::File
486-
/// [slice]: crate::slice
486+
/// [slice]: ../../std/primitive.slice.html
487487
#[stable(feature = "rust1", since = "1.0.0")]
488488
#[doc(spotlight)]
489489
pub trait Read {
@@ -633,7 +633,7 @@ pub trait Read {
633633
///
634634
/// [`File`]s implement `Read`:
635635
///
636-
/// [`read()`]: Self::read
636+
/// [`read()`]: Read::read
637637
/// [`Ok(0)`]: Ok
638638
/// [`File`]: crate::fs::File
639639
///
@@ -673,7 +673,7 @@ pub trait Read {
673673
///
674674
/// See [`read_to_end`] for other error semantics.
675675
///
676-
/// [`read_to_end`]: Self::read_to_end
676+
/// [`read_to_end`]: Read::read_to_end
677677
///
678678
/// # Examples
679679
///
@@ -746,7 +746,7 @@ pub trait Read {
746746
///
747747
/// [`File`]s implement `Read`:
748748
///
749-
/// [`read`]: Self::read
749+
/// [`read`]: Read::read
750750
/// [`File`]: crate::fs::File
751751
///
752752
/// ```no_run
@@ -1209,8 +1209,8 @@ impl Initializer {
12091209
/// throughout [`std::io`] take and provide types which implement the `Write`
12101210
/// trait.
12111211
///
1212-
/// [`write`]: Self::write
1213-
/// [`flush`]: Self::flush
1212+
/// [`write`]: Write::write
1213+
/// [`flush`]: Write::flush
12141214
/// [`std::io`]: self
12151215
///
12161216
/// # Examples
@@ -1236,7 +1236,7 @@ impl Initializer {
12361236
/// The trait also provides convenience methods like [`write_all`], which calls
12371237
/// `write` in a loop until its entire input has been written.
12381238
///
1239-
/// [`write_all`]: Self::write_all
1239+
/// [`write_all`]: Write::write_all
12401240
#[stable(feature = "rust1", since = "1.0.0")]
12411241
#[doc(spotlight)]
12421242
pub trait Write {
@@ -1296,7 +1296,7 @@ pub trait Write {
12961296
/// The default implementation calls [`write`] with either the first nonempty
12971297
/// buffer provided, or an empty one if none exists.
12981298
///
1299-
/// [`write`]: Self::write
1299+
/// [`write`]: Write::write
13001300
#[stable(feature = "iovec", since = "1.36.0")]
13011301
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize> {
13021302
default_write_vectored(|b| self.write(b), bufs)
@@ -1311,7 +1311,7 @@ pub trait Write {
13111311
///
13121312
/// The default implementation returns `false`.
13131313
///
1314-
/// [`write_vectored`]: Self::write_vectored
1314+
/// [`write_vectored`]: Write::write_vectored
13151315
#[unstable(feature = "can_vector", issue = "69941")]
13161316
fn is_write_vectored(&self) -> bool {
13171317
false
@@ -1359,7 +1359,7 @@ pub trait Write {
13591359
/// This function will return the first error of
13601360
/// non-[`ErrorKind::Interrupted`] kind that [`write`] returns.
13611361
///
1362-
/// [`write`]: Self::write
1362+
/// [`write`]: Write::write
13631363
///
13641364
/// # Examples
13651365
///
@@ -1400,8 +1400,6 @@ pub trait Write {
14001400
///
14011401
/// If the buffer contains no data, this will never call [`write_vectored`].
14021402
///
1403-
/// [`write_vectored`]: Self::write_vectored
1404-
///
14051403
/// # Notes
14061404
///
14071405
/// Unlike [`write_vectored`], this takes a *mutable* reference to
@@ -1415,6 +1413,8 @@ pub trait Write {
14151413
/// [`IoSlice`]s point (but not the [`IoSlice`]s themselves), are unchanged and
14161414
/// can be reused.
14171415
///
1416+
/// [`write_vectored`]: Write::write_vectored
1417+
///
14181418
/// # Examples
14191419
///
14201420
/// ```
@@ -1467,7 +1467,7 @@ pub trait Write {
14671467
/// are received. This also means that partial writes are not indicated in
14681468
/// this signature.
14691469
///
1470-
/// [`write_all`]: Self::write_all
1470+
/// [`write_all`]: Write::write_all
14711471
///
14721472
/// # Errors
14731473
///
@@ -1758,8 +1758,8 @@ fn read_until<R: BufRead + ?Sized>(r: &mut R, delim: u8, buf: &mut Vec<u8>) -> R
17581758
/// [`BufReader`] to the rescue!
17591759
///
17601760
/// [`File`]: crate::fs::File
1761-
/// [`read_line`]: Self::read_line
1762-
/// [`lines`]: Self::lines
1761+
/// [`read_line`]: BufRead::read_line
1762+
/// [`lines`]: BufRead::lines
17631763
///
17641764
/// ```no_run
17651765
/// use std::io::{self, BufReader};
@@ -1789,7 +1789,7 @@ pub trait BufRead: Read {
17891789
/// be called with the number of bytes that are consumed from this buffer to
17901790
/// ensure that the bytes are never returned twice.
17911791
///
1792-
/// [`consume`]: Self::consume
1792+
/// [`consume`]: BufRead::consume
17931793
///
17941794
/// An empty buffer returned indicates that the stream has reached EOF.
17951795
///
@@ -1839,7 +1839,7 @@ pub trait BufRead: Read {
18391839
/// Since `consume()` is meant to be used with [`fill_buf`],
18401840
/// that method's example includes an example of `consume()`.
18411841
///
1842-
/// [`fill_buf`]: Self::fill_buf
1842+
/// [`fill_buf`]: BufRead::fill_buf
18431843
#[stable(feature = "rust1", since = "1.0.0")]
18441844
fn consume(&mut self, amt: usize);
18451845

@@ -1863,7 +1863,7 @@ pub trait BufRead: Read {
18631863
/// If an I/O error is encountered then all bytes read so far will be
18641864
/// present in `buf` and its length will have been adjusted appropriately.
18651865
///
1866-
/// [`fill_buf`]: Self::fill_buf
1866+
/// [`fill_buf`]: BufRead::fill_buf
18671867
///
18681868
/// # Examples
18691869
///
@@ -1927,7 +1927,7 @@ pub trait BufRead: Read {
19271927
/// error is encountered then `buf` may contain some bytes already read in
19281928
/// the event that all data read so far was valid UTF-8.
19291929
///
1930-
/// [`read_until`]: Self::read_until
1930+
/// [`read_until`]: BufRead::read_until
19311931
///
19321932
/// # Examples
19331933
///
@@ -1980,7 +1980,7 @@ pub trait BufRead: Read {
19801980
///
19811981
/// [`io::Result`]: self::Result
19821982
/// [`Vec<u8>`]: Vec
1983-
/// [`read_until`]: Self::read_until
1983+
/// [`read_until`]: BufRead::read_until
19841984
///
19851985
/// # Examples
19861986
///
@@ -2011,7 +2011,7 @@ pub trait BufRead: Read {
20112011
///
20122012
/// The iterator returned from this function will yield instances of
20132013
/// [`io::Result`]`<`[`String`]`>`. Each string returned will *not* have a newline
2014-
/// byte (the `0xA` byte) or CRLF (0xD, 0xA bytes) at the end.
2014+
/// byte (the `0xA` byte) or `CRLF` (`0xD`, `0xA` bytes) at the end.
20152015
///
20162016
/// [`io::Result`]: self::Result
20172017
///

0 commit comments

Comments
 (0)