diff options
| author | Keegan McAllister <kmcallister@mozilla.com> | 2014-09-17 18:38:05 -0700 | 
|---|---|---|
| committer | Keegan McAllister <kmcallister@mozilla.com> | 2014-10-01 13:21:52 -0700 | 
| commit | eb1cbf3d1dc764e225ce4bd76d527db9f4cd0811 (patch) | |
| tree | 9f26a7203b68688dc09597ca606e7dbcc99d540f /src/doc/guide-macros.md | |
| parent | 61bf75bb5ee11eadefc7611dad3341e374c55b1d (diff) | |
| download | rust-eb1cbf3d1dc764e225ce4bd76d527db9f4cd0811.tar.gz rust-eb1cbf3d1dc764e225ce4bd76d527db9f4cd0811.zip  | |
Link plugins guide from elsewhere
Diffstat (limited to 'src/doc/guide-macros.md')
| -rw-r--r-- | src/doc/guide-macros.md | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/guide-macros.md b/src/doc/guide-macros.md index 50b2c281fcf..c2c374d3e1f 100644 --- a/src/doc/guide-macros.md +++ b/src/doc/guide-macros.md @@ -526,3 +526,10 @@ tricky. Invoking the `log_syntax!` macro can help elucidate intermediate states, invoking `trace_macros!(true)` will automatically print those intermediate states out, and passing the flag `--pretty expanded` as a command-line argument to the compiler will show the result of expansion. + +If Rust's macro system can't do what you need, you may want to write a +[compiler plugin](guide-plugin.html) instead. Compared to `macro_rules!` +macros, this is significantly more work, the interfaces are much less stable, +and the warnings about debugging apply ten-fold. In exchange you get the +flexibility of running arbitrary Rust code within the compiler. Syntax +extension plugins are sometimes called "procedural macros" for this reason.  | 
