From e66f62cf543f231e0746c5aaf1ca546871a0448b Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 3 Aug 2023 17:51:36 +0200 Subject: Make $code an expr instead of tt --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 8726de5..691bc34 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,7 +42,7 @@ pub use std::{env, process}; /// [`errx(3)`]: https://man.openbsd.org/err.3 #[macro_export] macro_rules! err_code { - ($code:tt, $($fmt:tt)+) => { + ($code:expr, $($fmt:tt)+) => { eprint!("{}: ", $crate::env::args().next().unwrap_or("Error".into())); eprintln!($($fmt)*); $crate::process::exit($code); -- cgit v1.2.3