]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #40220 - jseyfried:ast_macro_def, r=nrc
authorbors <bors@rust-lang.org>
Sat, 11 Mar 2017 22:48:14 +0000 (22:48 +0000)
committerbors <bors@rust-lang.org>
Sat, 11 Mar 2017 22:48:14 +0000 (22:48 +0000)
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info

This PR
 - adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items,
 - [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today),
 - removes `ast::MacroDef`, and
 - no longer uses `Mark` and `Invocation` to identify and characterize macro definitions.
   - We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter.

r? @nrc

1  2 
src/librustc_driver/driver.rs
src/libsyntax/ext/expand.rs

Simple merge
Simple merge