]> git.lizzy.rs Git - rust.git/commit
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)
commit1b19284ad9d85f2848650be6dd466ad0e1e2d82c
tree5d37bae176049302af3b44b780e7b344a51a15d6
parente4eb964dd950eb9afe861efc4ea5fc58c33b8296
parent8c98996934658631308e8fb4069d2db68ff44927
Auto merge of #40220 - jseyfried:ast_macro_def, r=nrc

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
src/librustc_driver/driver.rs
src/libsyntax/ext/expand.rs