@@ -479,11 +479,11 @@ where
479
479
/// }
480
480
/// ```
481
481
///
482
- /// [`read()`]: Self ::read
482
+ /// [`read()`]: Read ::read
483
483
/// [`&str`]: str
484
484
/// [`std::io`]: self
485
485
/// [`File`]: crate::fs::File
486
- /// [slice]: crate:: slice
486
+ /// [slice]: ../../std/primitive. slice.html
487
487
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
488
488
#[ doc( spotlight) ]
489
489
pub trait Read {
@@ -633,7 +633,7 @@ pub trait Read {
633
633
///
634
634
/// [`File`]s implement `Read`:
635
635
///
636
- /// [`read()`]: Self ::read
636
+ /// [`read()`]: Read ::read
637
637
/// [`Ok(0)`]: Ok
638
638
/// [`File`]: crate::fs::File
639
639
///
@@ -673,7 +673,7 @@ pub trait Read {
673
673
///
674
674
/// See [`read_to_end`] for other error semantics.
675
675
///
676
- /// [`read_to_end`]: Self ::read_to_end
676
+ /// [`read_to_end`]: Read ::read_to_end
677
677
///
678
678
/// # Examples
679
679
///
@@ -746,7 +746,7 @@ pub trait Read {
746
746
///
747
747
/// [`File`]s implement `Read`:
748
748
///
749
- /// [`read`]: Self ::read
749
+ /// [`read`]: Read ::read
750
750
/// [`File`]: crate::fs::File
751
751
///
752
752
/// ```no_run
@@ -1209,8 +1209,8 @@ impl Initializer {
1209
1209
/// throughout [`std::io`] take and provide types which implement the `Write`
1210
1210
/// trait.
1211
1211
///
1212
- /// [`write`]: Self ::write
1213
- /// [`flush`]: Self ::flush
1212
+ /// [`write`]: Write ::write
1213
+ /// [`flush`]: Write ::flush
1214
1214
/// [`std::io`]: self
1215
1215
///
1216
1216
/// # Examples
@@ -1236,7 +1236,7 @@ impl Initializer {
1236
1236
/// The trait also provides convenience methods like [`write_all`], which calls
1237
1237
/// `write` in a loop until its entire input has been written.
1238
1238
///
1239
- /// [`write_all`]: Self ::write_all
1239
+ /// [`write_all`]: Write ::write_all
1240
1240
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1241
1241
#[ doc( spotlight) ]
1242
1242
pub trait Write {
@@ -1296,7 +1296,7 @@ pub trait Write {
1296
1296
/// The default implementation calls [`write`] with either the first nonempty
1297
1297
/// buffer provided, or an empty one if none exists.
1298
1298
///
1299
- /// [`write`]: Self ::write
1299
+ /// [`write`]: Write ::write
1300
1300
#[ stable( feature = "iovec" , since = "1.36.0" ) ]
1301
1301
fn write_vectored ( & mut self , bufs : & [ IoSlice < ' _ > ] ) -> Result < usize > {
1302
1302
default_write_vectored ( |b| self . write ( b) , bufs)
@@ -1311,7 +1311,7 @@ pub trait Write {
1311
1311
///
1312
1312
/// The default implementation returns `false`.
1313
1313
///
1314
- /// [`write_vectored`]: Self ::write_vectored
1314
+ /// [`write_vectored`]: Write ::write_vectored
1315
1315
#[ unstable( feature = "can_vector" , issue = "69941" ) ]
1316
1316
fn is_write_vectored ( & self ) -> bool {
1317
1317
false
@@ -1359,7 +1359,7 @@ pub trait Write {
1359
1359
/// This function will return the first error of
1360
1360
/// non-[`ErrorKind::Interrupted`] kind that [`write`] returns.
1361
1361
///
1362
- /// [`write`]: Self ::write
1362
+ /// [`write`]: Write ::write
1363
1363
///
1364
1364
/// # Examples
1365
1365
///
@@ -1400,8 +1400,6 @@ pub trait Write {
1400
1400
///
1401
1401
/// If the buffer contains no data, this will never call [`write_vectored`].
1402
1402
///
1403
- /// [`write_vectored`]: Self::write_vectored
1404
- ///
1405
1403
/// # Notes
1406
1404
///
1407
1405
/// Unlike [`write_vectored`], this takes a *mutable* reference to
@@ -1415,6 +1413,8 @@ pub trait Write {
1415
1413
/// [`IoSlice`]s point (but not the [`IoSlice`]s themselves), are unchanged and
1416
1414
/// can be reused.
1417
1415
///
1416
+ /// [`write_vectored`]: Write::write_vectored
1417
+ ///
1418
1418
/// # Examples
1419
1419
///
1420
1420
/// ```
@@ -1467,7 +1467,7 @@ pub trait Write {
1467
1467
/// are received. This also means that partial writes are not indicated in
1468
1468
/// this signature.
1469
1469
///
1470
- /// [`write_all`]: Self ::write_all
1470
+ /// [`write_all`]: Write ::write_all
1471
1471
///
1472
1472
/// # Errors
1473
1473
///
@@ -1758,8 +1758,8 @@ fn read_until<R: BufRead + ?Sized>(r: &mut R, delim: u8, buf: &mut Vec<u8>) -> R
1758
1758
/// [`BufReader`] to the rescue!
1759
1759
///
1760
1760
/// [`File`]: crate::fs::File
1761
- /// [`read_line`]: Self ::read_line
1762
- /// [`lines`]: Self ::lines
1761
+ /// [`read_line`]: BufRead ::read_line
1762
+ /// [`lines`]: BufRead ::lines
1763
1763
///
1764
1764
/// ```no_run
1765
1765
/// use std::io::{self, BufReader};
@@ -1789,7 +1789,7 @@ pub trait BufRead: Read {
1789
1789
/// be called with the number of bytes that are consumed from this buffer to
1790
1790
/// ensure that the bytes are never returned twice.
1791
1791
///
1792
- /// [`consume`]: Self ::consume
1792
+ /// [`consume`]: BufRead ::consume
1793
1793
///
1794
1794
/// An empty buffer returned indicates that the stream has reached EOF.
1795
1795
///
@@ -1839,7 +1839,7 @@ pub trait BufRead: Read {
1839
1839
/// Since `consume()` is meant to be used with [`fill_buf`],
1840
1840
/// that method's example includes an example of `consume()`.
1841
1841
///
1842
- /// [`fill_buf`]: Self ::fill_buf
1842
+ /// [`fill_buf`]: BufRead ::fill_buf
1843
1843
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1844
1844
fn consume ( & mut self , amt : usize ) ;
1845
1845
@@ -1863,7 +1863,7 @@ pub trait BufRead: Read {
1863
1863
/// If an I/O error is encountered then all bytes read so far will be
1864
1864
/// present in `buf` and its length will have been adjusted appropriately.
1865
1865
///
1866
- /// [`fill_buf`]: Self ::fill_buf
1866
+ /// [`fill_buf`]: BufRead ::fill_buf
1867
1867
///
1868
1868
/// # Examples
1869
1869
///
@@ -1927,7 +1927,7 @@ pub trait BufRead: Read {
1927
1927
/// error is encountered then `buf` may contain some bytes already read in
1928
1928
/// the event that all data read so far was valid UTF-8.
1929
1929
///
1930
- /// [`read_until`]: Self ::read_until
1930
+ /// [`read_until`]: BufRead ::read_until
1931
1931
///
1932
1932
/// # Examples
1933
1933
///
@@ -1980,7 +1980,7 @@ pub trait BufRead: Read {
1980
1980
///
1981
1981
/// [`io::Result`]: self::Result
1982
1982
/// [`Vec<u8>`]: Vec
1983
- /// [`read_until`]: Self ::read_until
1983
+ /// [`read_until`]: BufRead ::read_until
1984
1984
///
1985
1985
/// # Examples
1986
1986
///
@@ -2011,7 +2011,7 @@ pub trait BufRead: Read {
2011
2011
///
2012
2012
/// The iterator returned from this function will yield instances of
2013
2013
/// [`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.
2015
2015
///
2016
2016
/// [`io::Result`]: self::Result
2017
2017
///
0 commit comments