about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/framework/tests.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-05-07 10:20:43 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-08-16 18:12:17 +0000
commit5173d85043918d70aeef3a623c3a247487c28843 (patch)
treee9587907e590175af902c5e4b60796b5d3d62a9c /compiler/rustc_mir_dataflow/src/framework/tests.rs
parent32711b2b4e1d0868b5576e568e27024186f8aa38 (diff)
downloadrust-5173d85043918d70aeef3a623c3a247487c28843.tar.gz
rust-5173d85043918d70aeef3a623c3a247487c28843.zip
Allow apply_terminator_effect to customize edges.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/framework/tests.rs')
-rw-r--r--compiler/rustc_mir_dataflow/src/framework/tests.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/tests.rs b/compiler/rustc_mir_dataflow/src/framework/tests.rs
index cb0ec144ef0..793f97b6c88 100644
--- a/compiler/rustc_mir_dataflow/src/framework/tests.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/tests.rs
@@ -198,14 +198,15 @@ impl<'tcx, D: Direction> Analysis<'tcx> for MockAnalysis<'tcx, D> {
         assert!(state.insert(idx));
     }
 
-    fn apply_terminator_effect(
+    fn apply_terminator_effect<'mir>(
         &mut self,
         state: &mut Self::Domain,
-        _terminator: &mir::Terminator<'tcx>,
+        terminator: &'mir mir::Terminator<'tcx>,
         location: Location,
-    ) {
+    ) -> TerminatorEdge<'mir, 'tcx> {
         let idx = self.effect(Effect::Primary.at_index(location.statement_index));
         assert!(state.insert(idx));
+        terminator.edges()
     }
 
     fn apply_before_terminator_effect(