diff options
| author | Camille Gillot <gillot.camille@gmail.com> | 2023-02-06 18:14:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-06 18:14:24 +0100 |
| commit | 9c5add14e7c1695bc018a941c383f01a7dde8730 (patch) | |
| tree | 8fee03d0827052da6dbf96ba711e1c63a388196e /compiler | |
| parent | 5c1cb5bbc6532c114ee509db7458ebe4967153da (diff) | |
| download | rust-9c5add14e7c1695bc018a941c383f01a7dde8730.tar.gz rust-9c5add14e7c1695bc018a941c383f01a7dde8730.zip | |
Comment move->copy transform.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_mir_transform/src/copy_prop.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/src/copy_prop.rs b/compiler/rustc_mir_transform/src/copy_prop.rs index 8f16df93a56..6e279232bcb 100644 --- a/compiler/rustc_mir_transform/src/copy_prop.rs +++ b/compiler/rustc_mir_transform/src/copy_prop.rs @@ -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) { |
