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

Improve interpolation of macro lhs and doc comments. Remove Matchers #17830

Merged
merged 5 commits into from
Nov 7, 2014

Conversation

pczarn
Copy link
Contributor

@pczarn pczarn commented Oct 6, 2014

Closes #14197

Removes the matchers nonterminal.

If you're using $foo:matchers in a macro, write $foo:tt instead.

[breaking-change]

@huonw
Copy link
Member

huonw commented Oct 7, 2014

Does this handle the following?

// other, so the result of the whole thing should be "let z_123 = 3; z_123
macro_rules! g (
    ($x:ident) =>
    (
        {macro_rules! f(
            ($y:ident)=>({let $y=3;$x})
        );
         f!($x)})
)

fn a(){g!(z)}

(If not, we probably shouldn't close #6994.)

@huonw huonw mentioned this pull request Oct 7, 2014
@pczarn
Copy link
Contributor Author

pczarn commented Oct 8, 2014

@huonw no, it fails to compile with an unresolved name. Whoa, it seems those are two different idents.

OK, this is just preliminary work for #6994, matcher quotation: #17396, doc comments: #14197, and some further improvements I have in mind.

r?

@pczarn pczarn force-pushed the interp_tt branch 3 times, most recently from cd6acf6 to ca86531 Compare October 10, 2014 19:32
@pnkfelix
Copy link
Member

cc me (I will try to review on Monday if no one else gets to it in the meantime).

@pnkfelix
Copy link
Member

@pczarn (okay, I'll try to avoid making comments about things that were addressed in later commits ... )

@pczarn pczarn force-pushed the interp_tt branch 2 times, most recently from 2bb45dd to e3b0399 Compare October 27, 2014 15:05
@pczarn pczarn force-pushed the interp_tt branch 2 times, most recently from 99a5f0e to 9f67980 Compare November 2, 2014 11:21
@alexcrichton
Copy link
Member

Feel free to ping the PR whenever you force-push it, sadly github doesn't send out notifications for that kind of event!

@pczarn pczarn force-pushed the interp_tt branch 2 times, most recently from d1606f2 to 2229754 Compare November 5, 2014 23:04
@adrientetar
Copy link
Contributor

@alexcrichton Look like it was updated

@pczarn
Copy link
Contributor Author

pczarn commented Nov 7, 2014

Yes, and this update actually works. I didn't have time to find mistakes after rebasing, previously

bors added a commit that referenced this pull request Nov 7, 2014
Closes #14197

Removes the `matchers` nonterminal.

If you're using `$foo:matchers` in a macro, write `$foo:tt` instead.

[breaking-change]
@bors bors closed this Nov 7, 2014
@bors bors merged commit 00676c8 into rust-lang:master Nov 7, 2014
@tomaka tomaka mentioned this pull request Nov 8, 2014
bors added a commit that referenced this pull request Nov 13, 2014
Fix ICEs introduced in #17830

* fixed get_tt for doc comments
* properly handle MatchNt in `quote`

Fixes #18763
Fixes #18775
pczarn added a commit to pczarn/rust that referenced this pull request Jan 6, 2015
Prevents breaking down `$name` tokens into separate `$` and `name`.
Reports unknown macro variables.

Fixes rust-lang#18775
Fixes rust-lang#18839
Fixes rust-lang#15640
@pczarn pczarn deleted the interp_tt branch January 14, 2015 16:55
dlrobertson pushed a commit to dlrobertson/rust that referenced this pull request Nov 29, 2018
Prevents breaking down `$name` tokens into separate `$` and `name`.
Reports unknown macro variables.

Fixes rust-lang#18775
Fixes rust-lang#18839
Fixes rust-lang#15640
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.

Expand doc comments to attributes before macro expansion
6 participants