Skip to content

Commit b865eb7

Browse files
committed
Clarify proc macros as crate type, not crate
1 parent ae8c5bc commit b865eb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/procedural-macros.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ procedural macros as functions from an AST to another AST.
1313

1414
### Crates and procedural macros
1515

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`.
1718

1819
> **Note**: When using Cargo, Procedural macro crates are defined with the
1920
> `proc-macro` key in your manfiest:
@@ -549,3 +550,5 @@ macros in some respects. These limitations include:
549550
* Error reporting is currently quite primitive. While an unstable diagnostic API
550551
exists on stable your only option is to `panic!` or to in some cases expand to
551552
an invocation of the `compile_error!` macro with a custom message.
553+
554+
[crate type]: linkage.html

0 commit comments

Comments
 (0)