Skip to content

Allow $foo:block nonterminals in expression position #14432

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 1 commit into from
May 26, 2014

Conversation

lilyball
Copy link
Contributor

Fixes #13678.

INTERPOLATED(token::NtExpr(e)) => {
Some(e)
}
INTERPOLATED(token::NtPath(_)) => {
let pt = maybe_path.take_unwrap();
Some($p.mk_expr(($p).span.lo, ($p).span.hi, ExprPath(pt)))
let pt = match $p.token {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't this be part of the outer match?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because mk_expr() takes a &mut pointer (for no valid reason except that all of the methods take &mut), so the outstanding reference from ref pt would trigger a borrowck error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. I guess we theoretically want to move the token out of p.token to avoid the borrowing and the clone.

r=me if you add a FIXME referencing this (no particular need for an issue).

bors added a commit that referenced this pull request May 26, 2014
@bors bors closed this May 26, 2014
@bors bors merged commit ff0f9b6 into rust-lang:master May 26, 2014
@lilyball lilyball deleted the nt_block branch May 26, 2014 19:01
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
Drop support for non-syroot proc macro ABIs

This makes some bigger changes to how we handle the proc-macro-srv things, for one it is now an empty crate if built without the `sysroot-abi` feature, this simplifies some things dropping the need to put the feature cfg in various places. The cli wrapper now actually depends on the server, instead of being part of the server that is just exported, that way we can have a true dummy server that just errors on each request if no sysroot support was specified.
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.

block arguments to macros are broken
3 participants