]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #39419 - jseyfried:simplify_tokentree, r=nrc
authorbors <bors@rust-lang.org>
Wed, 1 Mar 2017 05:58:09 +0000 (05:58 +0000)
committerbors <bors@rust-lang.org>
Wed, 1 Mar 2017 05:58:09 +0000 (05:58 +0000)
Simplify `TokenTree` and fix `macro_rules!` bugs

This PR
 - fixes #39390, fixes #39403, and fixes #39404 (each is a [breaking-change], see issues for examples),
 - fixes #39889,
 - simplifies and optimizes macro invocation parsing,
 - cleans up `ext::tt::transcribe`,
 - removes `tokenstream::TokenTree::Sequence` and `Token::MatchNt`,
   - instead, adds a new type `ext::tt::quoted::TokenTree` for use by `macro_rules!` (`ext::tt`)
 - removes `parser.quote_depth` and `parser.parsing_token_tree`, and
 - removes `quote_matcher!`.
   - Instead, use `quote_tokens!` and `ext::tt::quoted::parse` the result with `expect_matchers=true`.
   - I found no outside uses of `quote_matcher!` when searching Rust code on Github.

r? @nrc


Trivial merge