-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Generalize MacExpr / MacPat / MacItems #18814
Conversation
r? @kmcallister |
I don't have review privs on rust-lang/rust, but I added some comments. |
The blak lines are not present in the other Mac* so I didn't put them in MacGeneral for consistency, but I can add the blank lines |
This looks like an alternate approach to #19019 . Would anyone like to mediate between the two? |
@gamazeps any chance you can address the comments on this patch? Do you want one of us to take it and fix the minor issues? also, is this still needed? |
r? @kmcallister (just making sure the PR has an assignee, I think you have review privileges now?) |
This doesn't really resolve #17637; it should also remove the special-purpose types. The patch has some other problems; I'm working on a revived PR. |
MacEager is a MacResult implementation for the common case where you've already built each form of AST that you might return. Fixes rust-lang#17637. Based on rust-lang#18814. This is a [breaking-change] for syntax extensions: * MacExpr::new becomes MacEager::expr. * MacPat::new becomes MacEager::pat. * MacItems::new becomes MacEager::items. It takes a SmallVector directly, not an iterator.
MacEager is a MacResult implementation for the common case where you've already built each form of AST that you might return. Fixes rust-lang#17637. Based on rust-lang#18814. This is a [breaking-change] for syntax extensions: * MacExpr::new becomes MacEager::expr. * MacPat::new becomes MacEager::pat. * MacItems::new becomes MacEager::items. It takes a SmallVector directly, not an iterator. r? @sfackler
Might be a bit clumsy ...
Closes #17637