Switch to intra-doc links in std::macros

Also:
* Fix typo in module docs
* Link to `std::io::stderr` instead of `std::io::Stderr` to match the
  link text
* Link to `std::io::stdout`
This commit is contained in:
Camelid 2020-08-22 15:44:00 -07:00
parent 663d2f5cd3
commit 5d32786b4f

View File

@ -1,6 +1,6 @@
//! Standard library macros
//!
//! This modules contains a set of macros which are exported from the standard
//! This module contains a set of macros which are exported from the standard
//! library. Each macro is available for use when linking against the standard
//! library.
@ -29,9 +29,7 @@ macro_rules! panic {
/// Use `print!` only for the primary output of your program. Use
/// [`eprint!`] instead to print error and progress messages.
///
/// [`println!`]: ../std/macro.println.html
/// [flush]: ../std/io/trait.Write.html#tymethod.flush
/// [`eprint!`]: ../std/macro.eprint.html
/// [flush]: crate::io::Write::flush
///
/// # Panics
///
@ -74,13 +72,12 @@ macro_rules! print {
/// Use `println!` only for the primary output of your program. Use
/// [`eprintln!`] instead to print error and progress messages.
///
/// [`format!`]: ../std/macro.format.html
/// [`std::fmt`]: ../std/fmt/index.html
/// [`eprintln!`]: ../std/macro.eprintln.html
/// # Panics
///
/// Panics if writing to `io::stdout` fails.
///
/// [`io::stdout`]: crate::io::stdout
///
/// # Examples
///
/// ```
@ -107,8 +104,8 @@ macro_rules! println {
/// Use `eprint!` only for error and progress messages. Use `print!`
/// instead for the primary output of your program.
///
/// [`io::stderr`]: ../std/io/struct.Stderr.html
/// [`print!`]: ../std/macro.print.html
/// [`io::stderr`]: crate::io::stderr
/// [`io::stdout`]: crate::io::stdout
///
/// # Panics
///
@ -135,8 +132,8 @@ macro_rules! eprint {
/// Use `eprintln!` only for error and progress messages. Use `println!`
/// instead for the primary output of your program.
///
/// [`io::stderr`]: ../std/io/struct.Stderr.html
/// [`println!`]: ../std/macro.println.html
/// [`io::stderr`]: crate::io::stderr
/// [`io::stdout`]: crate::io::stdout
///
/// # Panics
///