We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c1cb5b commit 9c5add1Copy full SHA for 9c5add1
compiler/rustc_mir_transform/src/copy_prop.rs
@@ -153,6 +153,7 @@ impl<'tcx> MutVisitor<'tcx> for Replacer<'_, 'tcx> {
153
154
fn visit_operand(&mut self, operand: &mut Operand<'tcx>, loc: Location) {
155
if let Operand::Move(place) = *operand
156
+ // A move out of a projection of a copy is equivalent to a copy of the original projection.
157
&& !place.has_deref()
158
&& !self.fully_moved.contains(place.local)
159
{
0 commit comments