-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Grouping hygiene broken when copying TokenTrees to a new TokenStream #74036
Labels
C-bug
Category: This is a bug.
Comments
This is an instance of #67062. |
Ah, you are correct. Should I close this issue? |
Yes, I've left a comment on that issue, closing. |
m-ou-se
added a commit
to de-vri-es/assert2-rs
that referenced
this issue
Jul 4, 2020
See: rust-lang/rust#74036 Fixes #14.
de-vri-es
pushed a commit
to de-vri-es/assert2-rs
that referenced
this issue
Jul 4, 2020
See: rust-lang/rust#74036 Fixes #14.
de-vri-es
pushed a commit
to de-vri-es/assert2-rs
that referenced
this issue
Jul 4, 2020
See: rust-lang/rust#74036 Fixes #14.
de-vri-es
pushed a commit
to de-vri-es/assert2-rs
that referenced
this issue
Jul 4, 2020
See: rust-lang/rust#74036 Fixes #14.
de-vri-es
pushed a commit
to de-vri-es/assert2-rs
that referenced
this issue
Jul 4, 2020
See: rust-lang/rust#74036 Fixes #14.
de-vri-es
pushed a commit
to de-vri-es/assert2-rs
that referenced
this issue
Jul 4, 2020
See: rust-lang/rust#74036 Fixes #14.
de-vri-es
pushed a commit
to de-vri-es/assert2-rs
that referenced
this issue
Jul 16, 2020
See: rust-lang/rust#74036 Fixes #14.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We encountered an issue with the
assert2
crate where grouping hygiene did not survive a proc macro.See de-vri-es/assert2-rs#14 for the original issue.
We digged a little further and came up with a minimal example here: de-vri-es/proc-macro-grouping-hygiene-bug. It contains two proc macros, one that just clones a
TokenStream
, and one that creates a new one from the input:Then we run these tests:
We expected both assertions to pass, but the second one fails. The same problem occurs when converting a
syn::Expr
into a token stream again (which is how we originally found it).This seems like a very serious issue to me.
The text was updated successfully, but these errors were encountered: