MIR MutVisitor::visit_local
cannot mutate all Local
s
#71008
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
A-mir-opt
Area: MIR optimizations
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Specifically, when a
ProjectionElem::Index
is encountered, the containedLocal
is not passed tovisit_local
, requiring theMutVisitor
to also implementprocess_projection_elem
.This is a footgun that may cause unsound MIR transforms, which is what happened to me while working on #71003. The
CopyProp
pass also has to explicitly implementprocess_projection_elem
to be sound.The text was updated successfully, but these errors were encountered: