Skip to content
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

Merged
merged 5 commits into from
Jan 12, 2016

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Jan 4, 2016

Proper first and follow sets for macro_rules future proofing

implements first stage of RFC amendment 1384; see #30450

@rust-highfive
Copy link
Collaborator

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 4, 2016

(hmm I thought this built locally, not sure why that .span_note invocation wasn't caught...)

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[..]);
Copy link
Member

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?

@nrc
Copy link
Member

nrc commented Jan 4, 2016

r+ with a rebase and the nits addressed

@pnkfelix pnkfelix force-pushed the issue-25658-real-first-follow branch from 9cedb30 to 1b9b3ac Compare January 5, 2016 14:08
@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 7, 2016

@bors r=nrc

@bors
Copy link
Contributor

bors commented Jan 7, 2016

📌 Commit e51d537 has been approved by nrc

@bors
Copy link
Contributor

bors commented Jan 7, 2016

⌛ Testing commit e51d537 with merge cc03014...

@bors
Copy link
Contributor

bors commented Jan 7, 2016

💔 Test failed - auto-mac-64-opt

@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 7, 2016

(whoops, my local make check had too narrow a TESTNAME setting, mrrh...)

…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).
run-pass test for some new functionality.
@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 7, 2016

(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.)
@pnkfelix pnkfelix force-pushed the issue-25658-real-first-follow branch from e51d537 to a2960bc Compare January 7, 2016 23:36
@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 8, 2016

@bors r=nrc a2960bc

@bors
Copy link
Contributor

bors commented Jan 11, 2016

⌛ Testing commit a2960bc with merge 8084616...

@bors
Copy link
Contributor

bors commented Jan 11, 2016

💔 Test failed - auto-win-gnu-32-opt

@alexcrichton
Copy link
Member

@bors: retry

On Mon, Jan 11, 2016 at 3:33 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-gnu-32-opt
http://buildbot.rust-lang.org/builders/auto-win-gnu-32-opt/builds/2644


Reply to this email directly or view it on GitHub
#30694 (comment).

nagisa added a commit to nagisa/rust that referenced this pull request Jan 11, 2016
…low, r=nrc

Proper first and follow sets for macro_rules future proofing

implements first stage of RFC amendment 1384; see rust-lang#30450
bors added a commit that referenced this pull request Jan 11, 2016
@bors bors merged commit a2960bc into rust-lang:master Jan 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants