Skip to content

Instantly share code, notes, and snippets.

@nixpulvis
Created April 20, 2016 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nixpulvis/9076d7ad11273c937f1dce2e76595726 to your computer and use it in GitHub Desktop.
Save nixpulvis/9076d7ad11273c937f1dce2e76595726 to your computer and use it in GitHub Desktop.
debug! an expression and it's syntax.
#[macro_export]
macro_rules! debug_expr {
($expr:expr) => {{
let value = $expr;
debug!("`{}` = {:?}", stringify!($expr), value);
value
}};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment