Rust 1.84.1
e71f9a9a9

# Macros

There is a new edition of the book and this is an old link.

> While functions and types abstract over code, macros abstract at a syntactic level.

    macro_rules! five_times {
        ($x:expr) => (5 * $x);
    }

    fn main() {
        assert_eq!(25, five_times!(2 + 3));
    }

Here are the relevant sections in the new and old books:

- In the current edition: Ch 19.06 Macros
- Rust By Example: Macros
- In the Rust Reference: Ch 3.1 — Macros by Example
- In the first edition: Ch 3.34 — Macros