The aliased writes to *s causes s to gain the CELL flag, so the assignment at bb2[0] must be rewritten. But it has no unlowering info because we currently don't handle ExprKind::AssignOp in UnlowerVisitor::visit_expr_inner.
This seems tricky to deal with and may need special handling. *p.x appears only once in the input but must appear twice in the output (once in the receiver of Cell::get and again for Cell::set). We also don't yet support CELL rewrites when only a single field is modified, as in this case (maybe we should produce a better panic message for that).
Example:
Relevant MIR:
The aliased writes to
*s
causess
to gain theCELL
flag, so the assignment at bb2[0] must be rewritten. But it has no unlowering info because we currently don't handleExprKind::AssignOp
inUnlowerVisitor::visit_expr_inner
.This seems tricky to deal with and may need special handling.
*p.x
appears only once in the input but must appear twice in the output (once in the receiver ofCell::get
and again forCell::set
). We also don't yet supportCELL
rewrites when only a single field is modified, as in this case (maybe we should produce a better panic message for that).