From a1174797b4ce2259510f29d3468526b4c0d460c1 Mon Sep 17 00:00:00 2001 From: Roel Date: Sun, 22 Oct 2017 17:42:40 +0200 Subject: Rewrite err_println to eprintln introduced in Rust 1.19 (#799) --- src/macros.rs | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'src/macros.rs') diff --git a/src/macros.rs b/src/macros.rs index 00a9b529..35e69f2d 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -15,31 +15,11 @@ #[macro_export] macro_rules! die { ($($arg:tt)*) => {{ - err_println!($($arg)*); + eprintln!($($arg)*); ::std::process::exit(1); }} } -#[macro_export] -macro_rules! err_println { - ($($arg:tt)*) => {{ - if cfg!(feature = "err-println") { - use std::io::Write; - (writeln!(&mut ::std::io::stderr(), $($arg)*)).expect("stderr"); - } - }} -} - -#[macro_export] -macro_rules! err_print { - ($($arg:tt)*) => {{ - if cfg!(feature = "err-println") { - use std::io::Write; - (write!(&mut ::std::io::stderr(), $($arg)*)).expect("stderr"); - } - }} -} - #[macro_export] macro_rules! maybe { ($option:expr) => { -- cgit