Skip to content

Commit 640b36f

Browse files
authored
Rollup merge of #75821 - camelid:intra-doc-links-for-std-macros, r=jyn514
Switch to intra-doc links in `std::macros` Part of #75080. --- * Switch to intra-doc links in `std::macros` * 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` --- @rustbot modify labels: A-intra-doc-links T-doc T-rustdoc
2 parents 50bdcc2 + 637659b commit 640b36f

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

library/std/src/macros.rs

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Standard library macros
22
//!
3-
//! This modules contains a set of macros which are exported from the standard
3+
//! This module contains a set of macros which are exported from the standard
44
//! library. Each macro is available for use when linking against the standard
55
//! library.
66
@@ -29,9 +29,7 @@ macro_rules! panic {
2929
/// Use `print!` only for the primary output of your program. Use
3030
/// [`eprint!`] instead to print error and progress messages.
3131
///
32-
/// [`println!`]: ../std/macro.println.html
33-
/// [flush]: ../std/io/trait.Write.html#tymethod.flush
34-
/// [`eprint!`]: ../std/macro.eprint.html
32+
/// [flush]: crate::io::Write::flush
3533
///
3634
/// # Panics
3735
///
@@ -74,12 +72,13 @@ macro_rules! print {
7472
/// Use `println!` only for the primary output of your program. Use
7573
/// [`eprintln!`] instead to print error and progress messages.
7674
///
77-
/// [`format!`]: ../std/macro.format.html
78-
/// [`std::fmt`]: ../std/fmt/index.html
79-
/// [`eprintln!`]: ../std/macro.eprintln.html
75+
/// [`std::fmt`]: crate::fmt
76+
///
8077
/// # Panics
8178
///
82-
/// Panics if writing to `io::stdout` fails.
79+
/// Panics if writing to [`io::stdout`] fails.
80+
///
81+
/// [`io::stdout`]: crate::io::stdout
8382
///
8483
/// # Examples
8584
///
@@ -101,14 +100,14 @@ macro_rules! println {
101100
/// Prints to the standard error.
102101
///
103102
/// Equivalent to the [`print!`] macro, except that output goes to
104-
/// [`io::stderr`] instead of `io::stdout`. See [`print!`] for
103+
/// [`io::stderr`] instead of [`io::stdout`]. See [`print!`] for
105104
/// example usage.
106105
///
107106
/// Use `eprint!` only for error and progress messages. Use `print!`
108107
/// instead for the primary output of your program.
109108
///
110-
/// [`io::stderr`]: ../std/io/struct.Stderr.html
111-
/// [`print!`]: ../std/macro.print.html
109+
/// [`io::stderr`]: crate::io::stderr
110+
/// [`io::stdout`]: crate::io::stdout
112111
///
113112
/// # Panics
114113
///
@@ -129,14 +128,14 @@ macro_rules! eprint {
129128
/// Prints to the standard error, with a newline.
130129
///
131130
/// Equivalent to the [`println!`] macro, except that output goes to
132-
/// [`io::stderr`] instead of `io::stdout`. See [`println!`] for
131+
/// [`io::stderr`] instead of [`io::stdout`]. See [`println!`] for
133132
/// example usage.
134133
///
135134
/// Use `eprintln!` only for error and progress messages. Use `println!`
136135
/// instead for the primary output of your program.
137136
///
138-
/// [`io::stderr`]: ../std/io/struct.Stderr.html
139-
/// [`println!`]: ../std/macro.println.html
137+
/// [`io::stderr`]: crate::io::stderr
138+
/// [`io::stdout`]: crate::io::stdout
140139
///
141140
/// # Panics
142141
///

0 commit comments

Comments
 (0)