about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/dataflow
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_mir/src/dataflow')
-rw-r--r--compiler/rustc_mir/src/dataflow/move_paths/builder.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_mir/src/dataflow/move_paths/builder.rs b/compiler/rustc_mir/src/dataflow/move_paths/builder.rs
index 5c3e3538401..1f232554bf1 100644
--- a/compiler/rustc_mir/src/dataflow/move_paths/builder.rs
+++ b/compiler/rustc_mir/src/dataflow/move_paths/builder.rs
@@ -362,6 +362,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
     fn gather_terminator(&mut self, term: &Terminator<'tcx>) {
         match term.kind {
             TerminatorKind::Goto { target: _ }
+            | TerminatorKind::Return
             | TerminatorKind::Resume
             | TerminatorKind::Abort
             | TerminatorKind::GeneratorDrop
@@ -369,10 +370,6 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
             | TerminatorKind::FalseUnwind { .. }
             | TerminatorKind::Unreachable => {}
 
-            TerminatorKind::Return => {
-                self.gather_move(Place::return_place());
-            }
-
             TerminatorKind::Assert { ref cond, .. } => {
                 self.gather_operand(cond);
             }