Skip to content

Commit 36e6f4b

Browse files
add missing urls on io structs
1 parent ccfc38f commit 36e6f4b

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

src/libstd/io/mod.rs

+17-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//! of other types, and you can implement them for your types too. As such,
2222
//! you'll see a few different types of I/O throughout the documentation in
2323
//! this module: [`File`]s, [`TcpStream`]s, and sometimes even [`Vec<T>`]s. For
24-
//! example, `Read` adds a `read()` method, which we can use on `File`s:
24+
//! example, [`Read`] adds a [`read()`] method, which we can use on `File`s:
2525
//!
2626
//! ```
2727
//! use std::io;
@@ -251,6 +251,7 @@
251251
//! [`Lines`]: struct.Lines.html
252252
//! [`io::Result`]: type.Result.html
253253
//! [`try!`]: ../macro.try.html
254+
//! [`read()`]: trait.Read.html#tymethod.read
254255
255256
#![stable(feature = "rust1", since = "1.0.0")]
256257

@@ -814,19 +815,23 @@ pub trait Read {
814815
///
815816
/// Implementors of the `Write` trait are sometimes called 'writers'.
816817
///
817-
/// Writers are defined by two required methods, `write()` and `flush()`:
818+
/// Writers are defined by two required methods, [`write()`] and [`flush()`]:
818819
///
819-
/// * The `write()` method will attempt to write some data into the object,
820+
/// * The [`write()`] method will attempt to write some data into the object,
820821
/// returning how many bytes were successfully written.
821822
///
822-
/// * The `flush()` method is useful for adaptors and explicit buffers
823+
/// * The [`flush()`] method is useful for adaptors and explicit buffers
823824
/// themselves for ensuring that all buffered data has been pushed out to the
824825
/// 'true sink'.
825826
///
826827
/// Writers are intended to be composable with one another. Many implementors
827-
/// throughout `std::io` take and provide types which implement the `Write`
828+
/// throughout [`std::io`] take and provide types which implement the `Write`
828829
/// trait.
829830
///
831+
/// [`write()`]: #tymethod.write
832+
/// [`flush()`]: #tymethod.flush
833+
/// [`std::io`]: index.html
834+
///
830835
/// # Examples
831836
///
832837
/// ```
@@ -1475,10 +1480,10 @@ impl<T: BufRead, U: BufRead> BufRead for Chain<T, U> {
14751480

14761481
/// Reader adaptor which limits the bytes read from an underlying reader.
14771482
///
1478-
/// This struct is generally created by calling [`take()`][take] on a reader.
1479-
/// Please see the documentation of `take()` for more details.
1483+
/// This struct is generally created by calling [`take()`] on a reader.
1484+
/// Please see the documentation of [`take()`] for more details.
14801485
///
1481-
/// [take]: trait.Read.html#method.take
1486+
/// [`take()`]: trait.Read.html#method.take
14821487
#[stable(feature = "rust1", since = "1.0.0")]
14831488
pub struct Take<T> {
14841489
inner: T,
@@ -1491,8 +1496,10 @@ impl<T> Take<T> {
14911496
///
14921497
/// # Note
14931498
///
1494-
/// This instance may reach EOF after reading fewer bytes than indicated by
1495-
/// this method if the underlying `Read` instance reaches EOF.
1499+
/// This instance may reach `EOF` after reading fewer bytes than indicated by
1500+
/// this method if the underlying [`Read`] instance reaches EOF.
1501+
///
1502+
/// [`Read`]: ../../std/io/trait.Read.html
14961503
///
14971504
/// # Examples
14981505
///

src/libstd/io/stdio.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,11 @@ impl<'a> BufRead for StdinLock<'a> {
318318
///
319319
/// Each handle shares a global buffer of data to be written to the standard
320320
/// output stream. Access is also synchronized via a lock and explicit control
321-
/// over locking is available via the `lock` method.
321+
/// over locking is available via the [`lock()`] method.
322322
///
323323
/// Created by the [`io::stdout`] method.
324324
///
325+
/// [`lock()`]: #method.lock
325326
/// [`io::stdout`]: fn.stdout.html
326327
#[stable(feature = "rust1", since = "1.0.0")]
327328
pub struct Stdout {

0 commit comments

Comments
 (0)