File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ procedural macros as functions from an AST to another AST.
13
13
14
14
### Crates and procedural macros
15
15
16
- All procedural macros are compiled as a crate.
16
+ Procedural macros must be defined in a crate with the [ crate type] of
17
+ ` proc-macro ` .
17
18
18
19
> ** Note** : When using Cargo, Procedural macro crates are defined with the
19
20
> ` proc-macro ` key in your manfiest:
@@ -549,3 +550,5 @@ macros in some respects. These limitations include:
549
550
* Error reporting is currently quite primitive. While an unstable diagnostic API
550
551
exists on stable your only option is to ` panic! ` or to in some cases expand to
551
552
an invocation of the ` compile_error! ` macro with a custom message.
553
+
554
+ [crate type]: linkage.html
You can’t perform that action at this time.
0 commit comments