-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper first and follow sets for macro_rules future proofing #30694
Proper first and follow sets for macro_rules future proofing #30694
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
(hmm I thought this built locally, not sure why that |
fn check_lhs_nt_follows(cx: &mut ExtCtxt, lhs: &TokenTree, sp: Span) { | ||
// lhs is going to be like TokenTree::Delimited(...), where the | ||
// entire lhs is those tts. Or, it can be a "bare sequence", not wrapped in parens. | ||
match lhs { | ||
&TokenTree::Delimited(_, ref tts) => { | ||
check_matcher(cx, tts.tts.iter(), &Eof); | ||
check_matcher(cx, &tts.tts[..]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need the [..]
here?
r+ with a rebase and the nits addressed |
9cedb30
to
1b9b3ac
Compare
@bors r=nrc |
📌 Commit e51d537 has been approved by |
⌛ Testing commit e51d537 with merge cc03014... |
💔 Test failed - auto-mac-64-opt |
(whoops, my local |
…s validity. See RFC amendment 1384 and tracking issue 30450: rust-lang/rfcs#1384 rust-lang#30450 Moved old check_matcher code into check_matcher_old combined the two checks to enable a warning cycle (where we will continue to error if the two checks agree to reject, accept if the new check says accept, and warn if the old check accepts but the new check rejects).
See RFC amendment 1384: rust-lang/rfcs#1384
run-pass test for some new functionality.
(well, actually the test that is failing was added more recently than the base of my branch) |
macro future proofing rules. (We may want to think about what this test was actually testing and figure out a way to test it without running afoul of macro future proofing. I spent some time trying to do this, e.g. by inserting parenthesis in the macro input pattern, but I could not quickly get it working, so I took this tack instead.)
e51d537
to
a2960bc
Compare
⌛ Testing commit a2960bc with merge 8084616... |
💔 Test failed - auto-win-gnu-32-opt |
@bors: retry On Mon, Jan 11, 2016 at 3:33 PM, bors notifications@github.com wrote:
|
…low, r=nrc Proper first and follow sets for macro_rules future proofing implements first stage of RFC amendment 1384; see rust-lang#30450
Proper first and follow sets for macro_rules future proofing
implements first stage of RFC amendment 1384; see #30450