@@ -28,7 +28,7 @@ pub(super) fn compute<T: FactTypes>(
2828 let ( errors, subset_errors) = {
2929 // Static inputs
3030 let origin_live_on_entry_rel = & ctx. origin_live_on_entry ;
31- let cfg_edge_rel = & ctx. cfg_edge ;
31+ let cfg_edge = & ctx. cfg_edge ;
3232 let loan_killed_at = & ctx. loan_killed_at ;
3333 let known_subset = & ctx. known_subset ;
3434 let placeholder_origin = & ctx. placeholder_origin ;
@@ -59,14 +59,15 @@ pub(super) fn compute<T: FactTypes>(
5959 let origin_live_on_entry_var =
6060 iteration. variable :: < ( ( T :: Origin , T :: Point ) , ( ) ) > ( "origin_live_on_entry" ) ;
6161
62- // output relations: illegal accesses errors, and illegal subset relations errors
63- let errors = iteration. variable ( "errors" ) ;
64- let subset_errors = iteration. variable :: < ( T :: Origin , T :: Origin , T :: Point ) > ( "subset_errors" ) ;
65-
62+ // variable and index to compute the subsets of placeholders
6663 let subset_placeholder =
6764 iteration. variable :: < ( T :: Origin , T :: Origin , T :: Point ) > ( "subset_placeholder" ) ;
6865 let subset_placeholder_o2p = iteration. variable_indistinct ( "subset_placeholder_o2p" ) ;
6966
67+ // output relations: illegal accesses errors, and illegal subset relations errors
68+ let errors = iteration. variable ( "errors" ) ;
69+ let subset_errors = iteration. variable :: < ( T :: Origin , T :: Origin , T :: Point ) > ( "subset_errors" ) ;
70+
7071 // load initial facts.
7172 subset. extend ( ctx. subset_base . iter ( ) ) ;
7273 origin_contains_loan_on_entry. extend ( ctx. loan_issued_at . iter ( ) ) ;
@@ -102,9 +103,6 @@ pub(super) fn compute<T: FactTypes>(
102103 . borrow_mut ( )
103104 . elements
104105 . retain ( |& ( origin1, origin2, _) | origin1 != origin2) ;
105- subset_placeholder_o2p. from_map ( & subset_placeholder, |& ( origin1, origin2, point) | {
106- ( ( origin2, point) , origin1)
107- } ) ;
108106
109107 // remap fields to re-index by keys.
110108 subset_o1p. from_map ( & subset, |& ( origin1, origin2, point) | {
@@ -114,6 +112,10 @@ pub(super) fn compute<T: FactTypes>(
114112 ( ( origin2, point) , origin1)
115113 } ) ;
116114
115+ subset_placeholder_o2p. from_map ( & subset_placeholder, |& ( origin1, origin2, point) | {
116+ ( ( origin2, point) , origin1)
117+ } ) ;
118+
117119 origin_contains_loan_on_entry_op
118120 . from_map ( & origin_contains_loan_on_entry, |& ( origin, loan, point) | {
119121 ( ( origin, point) , loan)
@@ -140,7 +142,7 @@ pub(super) fn compute<T: FactTypes>(
140142 subset. from_leapjoin (
141143 & subset,
142144 (
143- cfg_edge_rel . extend_with ( |& ( _origin1, _origin2, point1) | point1) ,
145+ cfg_edge . extend_with ( |& ( _origin1, _origin2, point1) | point1) ,
144146 origin_live_on_entry_rel. extend_with ( |& ( origin1, _origin2, _point1) | origin1) ,
145147 origin_live_on_entry_rel. extend_with ( |& ( _origin1, origin2, _point1) | origin2) ,
146148 ) ,
@@ -169,7 +171,7 @@ pub(super) fn compute<T: FactTypes>(
169171 & origin_contains_loan_on_entry,
170172 (
171173 loan_killed_at. filter_anti ( |& ( _origin, loan, point1) | ( loan, point1) ) ,
172- cfg_edge_rel . extend_with ( |& ( _origin, _loan, point1) | point1) ,
174+ cfg_edge . extend_with ( |& ( _origin, _loan, point1) | point1) ,
173175 origin_live_on_entry_rel. extend_with ( |& ( origin, _loan, _point1) | origin) ,
174176 ) ,
175177 |& ( origin, loan, _point1) , & point2| ( origin, loan, point2) ,
0 commit comments