]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #39419 - jseyfried:simplify_tokentree, r=nrc
authorCorey Farwell <coreyf@rwell.org>
Wed, 1 Mar 2017 03:55:26 +0000 (22:55 -0500)
committerGitHub <noreply@github.com>
Wed, 1 Mar 2017 03:55:26 +0000 (22:55 -0500)
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