-
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
quasi-quoting a block expression doesn't work #26994
Comments
I think this has something to do with the ident loop_label, quasi-quoting is not pasting it into the break label position correctly. I previously had similar problems when I forgot to start the label name with a Note that the 'correct' version above compiles without an error, but generates incorrect code - no label to break to. If I build that part of the AST by hand, then it works fine. |
@nrc do you still care about this issue. Seems like an internal defect that doesn't much matter. |
It's not entirely internal since syntax extensions can use quasi-quoting. I suppose this will get 'fixed' when we change to token based quasi-quoting, but until then I think this is relevant |
Triage: being removed in #51285 |
Remove quote_*! macros This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved. Fixes #46849. Fixes #12265. Fixes #12266. Fixes #26994. r? @Manishearth
Remove quote_*! macros This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved. Fixes #46849. Fixes #12265. Fixes #12266. Fixes #26994. r? @Manishearth
quote_expr!(self.cx, { $result_name = Some($expr); break $loop_label; })
failed witherror: expected one of
.,
;,
}, or an operator, found
'__hoare_2``(__hoare_2
is the expected value of`$loop_label`). This failed in expansion so I couldn't get an expanded AST to find out what was going on.The work around:
worked fine
The text was updated successfully, but these errors were encountered: