Skip to content

Commit ded1ced

Browse files
committed
Expand the motivation section
1 parent 27215e7 commit ded1ced

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

text/3698-declarative-derive-macros.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ crates to avoid defining proc macros, reduce dependencies and compilation time,
2222
and provide these macros unconditionally without requiring the user to enable a
2323
feature.
2424

25+
The [`macro_rules_attribute`](https://crates.io/crates/macro_rules_attribute)
26+
crate defines proc macros that allow invoking declarative macros as derives,
27+
demonstrating a demand for this. This feature would allow defining such derives
28+
without requiring proc macros at all, and would support the same invocation
29+
syntax as a proc macro.
30+
31+
The derive feature of the crate has [various uses in the
32+
ecosystem](https://github.com/search?q=macro_rules_attribute%3A%3Aderive&type=code).
33+
That crate likewise offers a `derive_alias` mechanism, which could similarly be
34+
implemented using exclusively declarative macros given the feature proposed in
35+
this RFC.
36+
2537
# Guide-level explanation
2638
[guide-level-explanation]: #guide-level-explanation
2739

0 commit comments

Comments
 (0)