Comment move->copy transform.
This commit is contained in:
parent
5c1cb5bbc6
commit
9c5add14e7
1 changed files with 1 additions and 0 deletions
|
@ -153,6 +153,7 @@ impl<'tcx> MutVisitor<'tcx> for Replacer<'_, 'tcx> {
|
|||
|
||||
fn visit_operand(&mut self, operand: &mut Operand<'tcx>, loc: Location) {
|
||||
if let Operand::Move(place) = *operand
|
||||
// A move out of a projection of a copy is equivalent to a copy of the original projection.
|
||||
&& !place.has_deref()
|
||||
&& !self.fully_moved.contains(place.local)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue