]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/dataflow/move_paths/builder.rs
Merge remote-tracking branch 'origin/master' into gen
[rust.git] / src / librustc_mir / dataflow / move_paths / builder.rs
index c45c91011d9f4028f6fb4967d5828b28af594ca8..86298c3b83e29ce63a07876f88d0c49f6f610bbf 100644 (file)
@@ -263,6 +263,7 @@ fn gather_terminator(&mut self, loc: Location, term: &Terminator<'tcx>) {
         match term.kind {
             TerminatorKind::Goto { target: _ } |
             TerminatorKind::Resume |
+            TerminatorKind::GeneratorDrop |
             TerminatorKind::Unreachable => { }
 
             TerminatorKind::Return => {
@@ -274,6 +275,10 @@ fn gather_terminator(&mut self, loc: Location, term: &Terminator<'tcx>) {
                 // branching terminators - these don't move anything
             }
 
+            TerminatorKind::Yield { ref value, .. } => {
+                self.gather_operand(loc, value);
+            }
+
             TerminatorKind::Drop { ref location, target: _, unwind: _ } => {
                 self.gather_move(loc, location);
             }