-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-syntaxextArea: Syntax extensionsArea: Syntax extensionsC-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priority
Description
quote_expr!(self.cx, { $result_name = Some($expr); break $loop_label; })
failed with error: 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:
let stmts = vec![quote_stmt!(self.cx, $result_name = Some($expr);).unwrap(),
quote_stmt!(self.cx, break $loop_label;).unwrap()];
self.cx.expr_block(self.cx.block(stmts[0].span, stmts, None))
worked fine
Metadata
Metadata
Assignees
Labels
A-syntaxextArea: Syntax extensionsArea: Syntax extensionsC-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priority