diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-28 19:53:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-28 19:53:56 +0200 |
| commit | 2eff0deca3cceb84621e4b875c320652a4aede98 (patch) | |
| tree | df88466c7b06ed9b44bb269e22d17308ad65f060 /library/std/src | |
| parent | b4c63f06e84330b41ec705411ca9371a2de1ffc5 (diff) | |
| parent | 5016695357b37d56e68212b42baf97cc151d9b0a (diff) | |
| download | rust-2eff0deca3cceb84621e4b875c320652a4aede98.tar.gz rust-2eff0deca3cceb84621e4b875c320652a4aede98.zip | |
Rollup merge of #115310 - RalfJung:panic-and-format, r=scottmcm
Document panic behavior across editions, and improve xrefs This revives (parts of) https://github.com/rust-lang/rust/pull/96518. r? `@scottmcm` Cc `@ijackson`
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/macros.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/library/std/src/macros.rs b/library/std/src/macros.rs index ba1b8cbfa56..34b8b6b97b5 100644 --- a/library/std/src/macros.rs +++ b/library/std/src/macros.rs @@ -41,6 +41,9 @@ macro_rules! panic { /// Use `print!` only for the primary output of your program. Use /// [`eprint!`] instead to print error and progress messages. /// +/// See [the formatting documentation in `std::fmt`](../std/fmt/index.html) +/// for details of the macro argument syntax. +/// /// [flush]: crate::io::Write::flush /// [`println!`]: crate::println /// [`eprint!`]: crate::eprint @@ -103,6 +106,9 @@ macro_rules! print { /// Use `println!` only for the primary output of your program. Use /// [`eprintln!`] instead to print error and progress messages. /// +/// See [the formatting documentation in `std::fmt`](../std/fmt/index.html) +/// for details of the macro argument syntax. +/// /// [`std::fmt`]: crate::fmt /// [`eprintln!`]: crate::eprintln /// [lock]: crate::io::Stdout @@ -150,6 +156,9 @@ macro_rules! println { /// [`io::stderr`]: crate::io::stderr /// [`io::stdout`]: crate::io::stdout /// +/// See [the formatting documentation in `std::fmt`](../std/fmt/index.html) +/// for details of the macro argument syntax. +/// /// # Panics /// /// Panics if writing to `io::stderr` fails. @@ -181,6 +190,9 @@ macro_rules! eprint { /// Use `eprintln!` only for error and progress messages. Use `println!` /// instead for the primary output of your program. /// +/// See [the formatting documentation in `std::fmt`](../std/fmt/index.html) +/// for details of the macro argument syntax. +/// /// [`io::stderr`]: crate::io::stderr /// [`io::stdout`]: crate::io::stdout /// [`println!`]: crate::println |
