Skip to content

Instantly share code, notes, and snippets.

@shadowmint
Created March 4, 2014 03:29
Show Gist options
  • Save shadowmint/9339796 to your computer and use it in GitHub Desktop.
Save shadowmint/9339796 to your computer and use it in GitHub Desktop.
#[macro_escape];
#[macro_export]
macro_rules! trace(
($($arg:tt)*) => (
::std::io::stdout().write_line(format_args!(::std::fmt::format, $($arg)*))
);
)
#[test]
fn test_trace_macro() {
trace!("Hello World {} {}", 1, 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment