Skip to content

Permit token trees, identifiers, and blocks to be following by sequences. #25444

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

Merged
merged 2 commits into from
May 16, 2015

Conversation

nikomatsakis
Copy link
Contributor

Permit token trees, identifiers, and blocks to be following by sequences.

Fixes #25436.

r? @pnkfelix

@pnkfelix
Copy link
Member

@nikomatsakis the PR looks good. Could you add a compile-fail test for two sequences with no delimiter between them, e.g.:

macro_rules! foo {
    ( $($a:tt)* $($b:tt)* ) => { }; //~ ERROR sequence repetition followed by another sequence repetition
    ( $($a:item)* $($b:item)* ) => { }; //~ ERROR sequence repetition followed by another sequence repetition
}

@pnkfelix
Copy link
Member

(r=me after adding above test; or if you point me at a pre-existing test that does it -- i just didn't see one in my own grepping.)

@nikomatsakis
Copy link
Contributor Author

@bors r=pnkfelix

@bors
Copy link
Collaborator

bors commented May 16, 2015

📌 Commit 7a5d748 has been approved by pnkfelix

@bors
Copy link
Collaborator

bors commented May 16, 2015

⌛ Testing commit 7a5d748 with merge 63b000b...

bors added a commit that referenced this pull request May 16, 2015
Permit token trees, identifiers, and blocks to be following by sequences.

Fixes #25436.

r? @pnkfelix
@bors bors merged commit 7a5d748 into rust-lang:master May 16, 2015
@nikomatsakis nikomatsakis deleted the macro-tt-fix branch March 30, 2016 16:16
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.

$a:tt $($b:tt)* is forbidden in macros
3 participants