]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/dataflow/mod.rs
Merge remote-tracking branch 'origin/master' into gen
[rust.git] / src / librustc_mir / dataflow / mod.rs
index e460848450e0be4f41d300bcb461b185d245d07a..cdf991a0933f3b809fd354276278119c4a31434d 100644 (file)
@@ -655,15 +655,21 @@ fn propagate_bits_into_graph_successors_of(
         match bb_data.terminator().kind {
             mir::TerminatorKind::Return |
             mir::TerminatorKind::Resume |
+            mir::TerminatorKind::GeneratorDrop |
             mir::TerminatorKind::Unreachable => {}
             mir::TerminatorKind::Goto { ref target } |
             mir::TerminatorKind::Assert { ref target, cleanup: None, .. } |
+            mir::TerminatorKind::Yield { resume: ref target, drop: None, .. } |
             mir::TerminatorKind::Drop { ref target, location: _, unwind: None } |
             mir::TerminatorKind::DropAndReplace {
                 ref target, value: _, location: _, unwind: None
             } => {
                 self.propagate_bits_into_entry_set_for(in_out, changed, target);
             }
+            mir::TerminatorKind::Yield { resume: ref target, drop: Some(ref drop), .. } => {
+                self.propagate_bits_into_entry_set_for(in_out, changed, target);
+                self.propagate_bits_into_entry_set_for(in_out, changed, drop);
+            }
             mir::TerminatorKind::Assert { ref target, cleanup: Some(ref unwind), .. } |
             mir::TerminatorKind::Drop { ref target, location: _, unwind: Some(ref unwind) } |
             mir::TerminatorKind::DropAndReplace {