rust/src/librustc/driver
bors cdd6346f45 auto merge of #15601 : jbclements/rust/disable-default-macro-behavior, r=alexcrichton
Our AST definition can include macro invocations, which can expand into all kinds of things. Macro invocations are expanded away during expansion time, and the rest of the compiler doesn't have to deal with them. However, we have no way of enforcing this.

This patch adds two protective mechanisms.

First, it adds a (quick) explicit check that ensures there are no macro invocations remaining in the AST after expansion. Second, it updates the visit and fold mechanisms so that by default, they will not traverse macro invocations. It's easy enough to add this, if desired (it's documented in the source, and examples appear, e.g. in the IdentFinder.

Along the way, I also consulted with @sfackler to refactor the macro export mechanism so that it stores macro text spans in a side table, rather than leaving them in the AST.
2014-07-12 11:06:39 +00:00
..
config.rs Add scaffolding for assigning alpha-numeric codes to rustc diagnostics 2014-07-11 00:32:00 +02:00
driver.rs auto merge of #15601 : jbclements/rust/disable-default-macro-behavior, r=alexcrichton 2014-07-12 11:06:39 +00:00
mod.rs Add scaffolding for assigning alpha-numeric codes to rustc diagnostics 2014-07-11 00:32:00 +02:00
session.rs auto merge of #15601 : jbclements/rust/disable-default-macro-behavior, r=alexcrichton 2014-07-12 11:06:39 +00:00