-
Notifications
You must be signed in to change notification settings - Fork 321
izip! is just wrong #970
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
Comments
Yikes, thanks for the report! Disappointed that this slipped through our CI. |
@DeltaEpsilon7787 It seems to be working just fine: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=435b75b4411195ae0a4fcce78aac4ca9 Do you have an example of something going wrong? |
Copying your example in Sublime Text, I get the same |
Just out of curiosity: Does anybody know if our CI would have cought this? (Would dig into this myself, but lack time.) |
Well there is nothing to catch. But the detected weirdness appears when there are at least 3 arguments to |
We figured out the reason for the weirdness, so to speak. It's due to hygienic macros. The macro expanded code cannot represent the fact that those different b have different context assigned to them, so they are not, in fact, 4 variables named b, they are 4 variables that are essentially named b+[ID1], b+[ID2], b+[ID3], b+[ID4] wherein ID is an anonymous identifier constructed on every macro expansion. Kind of like variable owner aspect, which is also invisible. |
itertools = "0.13.0"
expands into
which is obviously wrong.
The text was updated successfully, but these errors were encountered: