#![feature(use_extern_macros)] #![feature(proc_macro_path_invoc)] extern crate trace2; #[macro_use] extern crate log; extern crate env_logger; #[::trace2::trace2] fn foo(a: i32, b: i32) { println!("I'm in foo!"); bar((a, b)); } #[::trace2::trace2] fn bar((a, b): (i32, i32)) -> i32 { println!("I'm in bar!"); if a == 1 { 2 } else { b } } fn main() { env_logger::Builder::from_default_env() .default_format_module_path(false) .init(); foo(1, 2); }