1
1
use rustc_middle:: mir:: {
2
- self , BasicBlock , CallReturnPlaces , Location , SwitchTargets , TerminatorEdge , UnwindAction ,
2
+ self , BasicBlock , CallReturnPlaces , Location , SwitchTargets , TerminatorEdges , UnwindAction ,
3
3
} ;
4
4
use std:: ops:: RangeInclusive ;
5
5
@@ -29,7 +29,7 @@ pub trait Direction {
29
29
block : BasicBlock ,
30
30
block_data : & ' mir mir:: BasicBlockData < ' tcx > ,
31
31
statement_effect : Option < & dyn Fn ( BasicBlock , & mut A :: Domain ) > ,
32
- ) -> TerminatorEdge < ' mir , ' tcx >
32
+ ) -> TerminatorEdges < ' mir , ' tcx >
33
33
where
34
34
A : Analysis < ' tcx > ;
35
35
@@ -55,7 +55,7 @@ pub trait Direction {
55
55
body : & mir:: Body < ' tcx > ,
56
56
exit_state : & mut A :: Domain ,
57
57
block : BasicBlock ,
58
- edges : TerminatorEdge < ' _ , ' tcx > ,
58
+ edges : TerminatorEdges < ' _ , ' tcx > ,
59
59
propagate : impl FnMut ( BasicBlock , & A :: Domain ) ,
60
60
) where
61
61
A : Analysis < ' tcx > ;
@@ -73,7 +73,7 @@ impl Direction for Backward {
73
73
block : BasicBlock ,
74
74
block_data : & ' mir mir:: BasicBlockData < ' tcx > ,
75
75
statement_effect : Option < & dyn Fn ( BasicBlock , & mut A :: Domain ) > ,
76
- ) -> TerminatorEdge < ' mir , ' tcx >
76
+ ) -> TerminatorEdges < ' mir , ' tcx >
77
77
where
78
78
A : Analysis < ' tcx > ,
79
79
{
@@ -222,7 +222,7 @@ impl Direction for Backward {
222
222
body : & mir:: Body < ' tcx > ,
223
223
exit_state : & mut A :: Domain ,
224
224
bb : BasicBlock ,
225
- _edges : TerminatorEdge < ' _ , ' tcx > ,
225
+ _edges : TerminatorEdges < ' _ , ' tcx > ,
226
226
mut propagate : impl FnMut ( BasicBlock , & A :: Domain ) ,
227
227
) where
228
228
A : Analysis < ' tcx > ,
@@ -330,7 +330,7 @@ impl Direction for Forward {
330
330
block : BasicBlock ,
331
331
block_data : & ' mir mir:: BasicBlockData < ' tcx > ,
332
332
statement_effect : Option < & dyn Fn ( BasicBlock , & mut A :: Domain ) > ,
333
- ) -> TerminatorEdge < ' mir , ' tcx >
333
+ ) -> TerminatorEdges < ' mir , ' tcx >
334
334
where
335
335
A : Analysis < ' tcx > ,
336
336
{
@@ -474,19 +474,19 @@ impl Direction for Forward {
474
474
_body : & mir:: Body < ' tcx > ,
475
475
exit_state : & mut A :: Domain ,
476
476
bb : BasicBlock ,
477
- edges : TerminatorEdge < ' _ , ' tcx > ,
477
+ edges : TerminatorEdges < ' _ , ' tcx > ,
478
478
mut propagate : impl FnMut ( BasicBlock , & A :: Domain ) ,
479
479
) where
480
480
A : Analysis < ' tcx > ,
481
481
{
482
482
match edges {
483
- TerminatorEdge :: None => { }
484
- TerminatorEdge :: Single ( target) => propagate ( target, exit_state) ,
485
- TerminatorEdge :: Double ( target, unwind) => {
483
+ TerminatorEdges :: None => { }
484
+ TerminatorEdges :: Single ( target) => propagate ( target, exit_state) ,
485
+ TerminatorEdges :: Double ( target, unwind) => {
486
486
propagate ( target, exit_state) ;
487
487
propagate ( unwind, exit_state) ;
488
488
}
489
- TerminatorEdge :: AssignOnReturn { return_, unwind, place } => {
489
+ TerminatorEdges :: AssignOnReturn { return_, unwind, place } => {
490
490
// This must be done *first*, otherwise the unwind path will see the assignments.
491
491
if let UnwindAction :: Cleanup ( unwind) = unwind {
492
492
propagate ( unwind, exit_state) ;
@@ -496,7 +496,7 @@ impl Direction for Forward {
496
496
propagate ( return_, exit_state) ;
497
497
}
498
498
}
499
- TerminatorEdge :: SwitchInt { targets, discr } => {
499
+ TerminatorEdges :: SwitchInt { targets, discr } => {
500
500
let mut applier = ForwardSwitchIntEdgeEffectsApplier {
501
501
exit_state,
502
502
targets,
0 commit comments