← board

Rust frontend — macro_rules! (scope-cut: builtins first)

What it does

macro_rules! is genuinely new machinery vs. C's textual cpreproc.inc — it matches token trees, supports repetition ($()*), fragment specifiers (expr/ident/ty/...), and identifier hygiene. Not a reuse of the C preprocessor.

v1 scope cut (per [[feature-rust-frontend]] non-goals): hardcode the common builtin macros as compiler intrinsics rather than building a general macro_rules! engine:

General macro_rules! (arbitrary user-defined macros) is deferred indefinitely — same call as skipping full borrow-check enforcement: a real gap, documented, not silently pretended away.

Acceptance

Log