Skip to content

Macro Rules practice problems in Rust

Difficulty:
Category:
Tag:

Showing 13 of 13

Status Title Difficulty
A mini DSL: compile-time expression evaluation Hard
Building std's macros: vec!, matches!, a HashMap literal Medium
Callbacks and TT bundling Hard
Counting repetitions without ${count} (which is still unstable) Medium
expr is atomic, tt is not: the precedence trap Medium
Follow-set rules: why the compiler rejects your matcher Hard
Fragment specifiers: the complete tour Medium
Internal rules and push-down accumulation Hard
Macro hygiene: why your variable didn't leak Medium
Macro recursion and incremental TT munchers Hard
Nested repetition and zipping metavariables Hard
Repetition: $(...),* and friends Easy
Your first macro_rules!: matchers and transcribers Easy