Skip to content

Commit a7dde80

Browse files
committed
Copy motivating examples from prior art to motivation
1 parent cd2c9f5 commit a7dde80

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

text/3697-declarative-attribute-macros.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ allow many crates to avoid defining proc macros, reduce dependencies and
2222
compilation time, and provide these macros unconditionally without requiring
2323
the user to enable a 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 attributes,
27+
demonstrating a demand for this. This feature would allow defining such
28+
attributes without requiring proc macros at all, and would support the same
29+
invocation syntax as a proc macro.
30+
31+
Some macros in the ecosystem already implement the equivalent of attribute
32+
using declarative macros; for instance, see
33+
[smol-macros](https://crates.io/crates/smol-macros), which provides a `main!`
34+
macro and recommends using it with `macro_rules_attribute::apply`.
35+
2536
# Guide-level explanation
2637
[guide-level-explanation]: #guide-level-explanation
2738

0 commit comments

Comments
 (0)