Macro with ident - create function
- ident matches an identifier (e.g variable names, function names)
examples/macros/macro-create-function/src/main.rs
macro_rules! define_function { ($var:ident) => { fn $var() { println!("hi"); } }; } fn main() { define_function!(hi); hi(); }