Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/procedural-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Procedural macros must be defined in a crate with the [crate type] of
> [lib]
> proc-macro = true
> ```
>
> This will automatically links to the compiler-provided [proc_macro](https://doc.rust-lang.org/proc_macro/index.html) crate.
> `extern crate proc_macro;` would be needed if you want to support releases
> older than Rust 2018, or if using another build tool that does not pass the
> appropriate `--extern` flags to rustc.

As functions, they must either return syntax, panic, or loop endlessly. Returned
syntax either replaces or adds the syntax depending on the kind of procedural
Expand Down