- macro_rules
Hello World macro
- The name of the macro is hello_world
- The () matches empty input.
examples/macros/hello-world/src/main.rs
macro_rules! hello_world { () => { println!("Hello World!"); }; } fn main() { hello_world!(); }
macro_rules! hello_world { () => { println!("Hello World!"); }; } fn main() { hello_world!(); }