Skip to content

Declarative (macro_rules!) macro improvements #252

Open
@nikomatsakis

Description

@nikomatsakis
Metadata
Point of contact @joshtriplett
Team(s) lang, wg-macros
Goal document 2025h1/macro-improvements

Summary

In this project goal, I'll propose and shepherd Rust language RFCs to make
macro_rules! macros just as capable as proc macros, and to make such macros
easier to write. I'll also start prototyping extensions to the declarative
macro system to make macros easier to write, with the aim of discussing and
reaching consensus on those additional proposals during RustWeek (May 2025) at
the latest. Finally, I'll write a series of Inside Rust blog posts on these
features, to encourage crate authors to try them and provide feedback, and to
plan transitions within the ecosystem.

The scope of this goal is an arc of many related RFCs that tell a complete
story, as well as the implementation of the first few steps.

Tasks and status

macro_rules! attributes

macro_rules! derives

Design and iteration for macro fragment fields

Design for macro metavariable constructs

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Project goal

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions