Skip to content

Commit 2f51f67

Browse files
committed
Adding eprint*! to the list of macros in the format! family
1 parent 1dc0b57 commit 2f51f67

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/liballoc/fmt.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@
236236
//! writeln! // same as write but appends a newline
237237
//! print! // the format string is printed to the standard output
238238
//! println! // same as print but appends a newline
239+
//! eprint! // the format string is printed to the standard error
240+
//! eprintln! // same as eprint but appends a newline
239241
//! format_args! // described below.
240242
//! ```
241243
//!
@@ -264,6 +266,11 @@
264266
//! print!("Hello {}!", "world");
265267
//! println!("I have a newline {}", "character at the end");
266268
//! ```
269+
//! ### `eprint!`
270+
//!
271+
//! The [`eprint!`] and [`eprintln!`] macros are identical to
272+
//! [`print!`] and [`println!`], respectively, except they emit their
273+
//! output to stderr.
267274
//!
268275
//! ### `format_args!`
269276
//!
@@ -490,7 +497,10 @@
490497
//! [`writeln!`]: ../../std/macro.writeln.html
491498
//! [`write_fmt`]: ../../std/io/trait.Write.html#method.write_fmt
492499
//! [`std::io::Write`]: ../../std/io/trait.Write.html
500+
//! [`print!`]: ../../std/macro.print.html
493501
//! [`println!`]: ../../std/macro.println.html
502+
//! [`eprint!`]: ../../std/macro.eprint.html
503+
//! [`eprintln!`]: ../../std/macro.eprintln.html
494504
//! [`write!`]: ../../std/macro.write.html
495505
//! [`format_args!`]: ../../std/macro.format_args.html
496506
//! [`fmt::Arguments`]: struct.Arguments.html

0 commit comments

Comments
 (0)