Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upquasi-quoting a block expression doesn't work #26994
Comments
nrc
added
the
A-syntaxext
label
Jul 12, 2015
This comment has been minimized.
This comment has been minimized.
|
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. |
brson
added
the
P-low
label
Jan 12, 2017
This comment has been minimized.
This comment has been minimized.
|
@nrc do you still care about this issue. Seems like an internal defect that doesn't much matter. |
This comment has been minimized.
This comment has been minimized.
|
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 |
Mark-Simulacrum
added
the
C-bug
label
Jul 22, 2017
This comment has been minimized.
This comment has been minimized.
|
Triage: being removed in #51285 |
nrc commentedJul 12, 2015
quote_expr!(self.cx, { $result_name = Some($expr); break $loop_label; })failed witherror: expected one of.,;,}, or an operator, found'__hoare_2``(__hoare_2is 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