Add eprint! and eprintln! macros to the prelude.

These are exactly the same as `print!` and `println!` except that
they write to stderr instead of stdout.  Issue #39228.
This commit is contained in:
Zack Weinberg
2017-01-21 13:38:11 -05:00
parent 2b97174ada
commit 76127275a0
4 changed files with 123 additions and 0 deletions

View File

@@ -290,6 +290,8 @@ pub use self::util::{copy, sink, Sink, empty, Empty, repeat, Repeat};
pub use self::stdio::{stdin, stdout, stderr, _print, Stdin, Stdout, Stderr};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::stdio::{StdoutLock, StderrLock, StdinLock};
#[unstable(feature = "eprint", issue="39228")]
pub use self::stdio::_eprint;
#[unstable(feature = "libstd_io_internals", issue = "0")]
#[doc(no_inline, hidden)]
pub use self::stdio::{set_panic, set_print};