mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Change eprintln!()
Address #30143 as well. `writeln!()` hasn't been changed.
This commit is contained in:
parent
00d500052c
commit
a7a68370a7
@ -217,10 +217,17 @@ macro_rules! eprint {
|
||||
/// ```
|
||||
#[macro_export]
|
||||
#[stable(feature = "eprint", since = "1.19.0")]
|
||||
#[allow_internal_unstable]
|
||||
macro_rules! eprintln {
|
||||
() => (eprint!("\n"));
|
||||
($fmt:expr) => (eprint!(concat!($fmt, "\n")));
|
||||
($fmt:expr, $($arg:tt)*) => (eprint!(concat!($fmt, "\n"), $($arg)*));
|
||||
($($arg:tt)*) => ({
|
||||
#[cfg(not(stage0))] {
|
||||
($crate::io::_eprint(format_args_nl!($($arg)*)));
|
||||
}
|
||||
#[cfg(stage0)] {
|
||||
eprint!("{}\n", format_args!($($arg)*))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
|
Loading…
Reference in New Issue
Block a user