@@ -131,13 +131,13 @@ struct Context<'ctx, T: FactTypes> {
131131 placeholder_origin : Relation < ( T :: Origin , ( ) ) > ,
132132 placeholder_loan : Relation < ( T :: Loan , T :: Origin ) > ,
133133
134- // The `known_subset ` relation in the facts does not necessarily contain all the transitive
135- // subsets. The transitive closure is always needed, so this version here is fully closed
136- // over.
137- known_subset : Relation < ( T :: Origin , T :: Origin ) > ,
134+ // The `known_placeholder_subset ` relation in the facts does not necessarily contain all the
135+ // transitive subsets. The transitive closure is always needed, so this version here is fully
136+ // closed over.
137+ known_placeholder_subset : Relation < ( T :: Origin , T :: Origin ) > ,
138138
139- // while this static input is unused by `LocationInsensitive`, it's depended on by initialization
140- // and liveness, so already computed by the time we get to borrowcking.
139+ // while this static input is unused by `LocationInsensitive`, it's depended on by
140+ // initialization and liveness, so already computed by the time we get to borrowcking.
141141 cfg_edge : Relation < ( T :: Point , T :: Point ) > ,
142142
143143 // Partial results possibly used by other variants as input
@@ -236,17 +236,18 @@ impl<T: FactTypes> Output<T> {
236236
237237 let loan_killed_at = all_facts. loan_killed_at . clone ( ) . into ( ) ;
238238
239- // `known_subset ` is a list of all the `'a: 'b` subset relations the user gave:
239+ // `known_placeholder_subset ` is a list of all the `'a: 'b` subset relations the user gave:
240240 // it's not required to be transitive. `known_contains` is its transitive closure: a list
241241 // of all the known placeholder loans that each of these placeholder origins contains.
242- // Given the `known_subset `s `'a: 'b` and `'b: 'c`: in the `known_contains` relation, `'a `
243- // will also contain `'c`'s placeholder loan.
244- let known_subset = all_facts. known_subset . clone ( ) . into ( ) ;
242+ // Given the `known_placeholder_subset `s `'a: 'b` and `'b: 'c`: in the `known_contains`
243+ // relation, `'a` will also contain `'c`'s placeholder loan.
244+ let known_placeholder_subset = all_facts. known_placeholder_subset . clone ( ) . into ( ) ;
245245 let known_contains =
246- Output :: < T > :: compute_known_contains ( & known_subset , & all_facts. placeholder ) ;
246+ Output :: < T > :: compute_known_contains ( & known_placeholder_subset , & all_facts. placeholder ) ;
247247
248- // Fully close over the `known_subset` relation.
249- let known_subset = Output :: < T > :: compute_known_subset ( & known_subset) ;
248+ // Fully close over the `known_placeholder_subset` relation.
249+ let known_placeholder_subset =
250+ Output :: < T > :: compute_known_placeholder_subset ( & known_placeholder_subset) ;
250251
251252 let placeholder_origin: Relation < _ > = Relation :: from_iter (
252253 all_facts
@@ -271,7 +272,7 @@ impl<T: FactTypes> Output<T> {
271272 loan_issued_at : & all_facts. loan_issued_at ,
272273 loan_killed_at,
273274 known_contains,
274- known_subset ,
275+ known_placeholder_subset ,
275276 placeholder_origin,
276277 placeholder_loan,
277278 potential_errors : None ,
@@ -392,10 +393,10 @@ impl<T: FactTypes> Output<T> {
392393 result
393394 }
394395
395- /// Computes the transitive closure of the `known_subset ` relation, so that we have
396+ /// Computes the transitive closure of the `known_placeholder_subset ` relation, so that we have
396397 /// the full list of placeholder loans contained by the placeholder origins.
397398 fn compute_known_contains (
398- known_subset : & Relation < ( T :: Origin , T :: Origin ) > ,
399+ known_placeholder_subset : & Relation < ( T :: Origin , T :: Origin ) > ,
399400 placeholder : & [ ( T :: Origin , T :: Loan ) ] ,
400401 ) -> Relation < ( T :: Origin , T :: Loan ) > {
401402 let mut iteration = datafrog:: Iteration :: new ( ) ;
@@ -408,43 +409,42 @@ impl<T: FactTypes> Output<T> {
408409 while iteration. changed ( ) {
409410 // known_contains(Origin2, Loan1) :-
410411 // known_contains(Origin1, Loan1),
411- // known_subset (Origin1, Origin2).
412+ // known_placeholder_subset (Origin1, Origin2).
412413 known_contains. from_join (
413414 & known_contains,
414- known_subset ,
415+ known_placeholder_subset ,
415416 |& _origin1, & loan1, & origin2| ( origin2, loan1) ,
416417 ) ;
417418 }
418419
419420 known_contains. complete ( )
420421 }
421422
422- /// Computes the transitive closure of the `known_subset ` relation.
423- fn compute_known_subset (
424- known_subset : & Relation < ( T :: Origin , T :: Origin ) > ,
423+ /// Computes the transitive closure of the `known_placeholder_subset ` relation.
424+ fn compute_known_placeholder_subset (
425+ known_placeholder_subset_base : & Relation < ( T :: Origin , T :: Origin ) > ,
425426 ) -> Relation < ( T :: Origin , T :: Origin ) > {
426427 use datafrog:: { Iteration , RelationLeaper } ;
427428 let mut iteration = Iteration :: new ( ) ;
428429
429- let known_subset_base = known_subset;
430- let known_subset = iteration. variable ( "known_subset" ) ;
430+ let known_placeholder_subset = iteration. variable ( "known_placeholder_subset" ) ;
431431
432- // known_subset (Origin1, Origin2) :-
433- // known_subset_base (Origin1, Origin2).
434- known_subset . extend ( known_subset_base . iter ( ) ) ;
432+ // known_placeholder_subset (Origin1, Origin2) :-
433+ // known_placeholder_subset_base (Origin1, Origin2).
434+ known_placeholder_subset . extend ( known_placeholder_subset_base . iter ( ) ) ;
435435
436436 while iteration. changed ( ) {
437- // known_subset (Origin1, Origin3) :-
438- // known_subset (Origin1, Origin2),
439- // known_subset_base (Origin2, Origin3).
440- known_subset . from_leapjoin (
441- & known_subset ,
442- known_subset_base . extend_with ( |& ( _origin1, origin2) | origin2) ,
437+ // known_placeholder_subset (Origin1, Origin3) :-
438+ // known_placeholder_subset (Origin1, Origin2),
439+ // known_placeholder_subset_base (Origin2, Origin3).
440+ known_placeholder_subset . from_leapjoin (
441+ & known_placeholder_subset ,
442+ known_placeholder_subset_base . extend_with ( |& ( _origin1, origin2) | origin2) ,
443443 |& ( origin1, _origin2) , & origin3| ( origin1, origin3) ,
444444 ) ;
445445 }
446446
447- known_subset . complete ( )
447+ known_placeholder_subset . complete ( )
448448 }
449449
450450 fn new ( dump_enabled : bool ) -> Self {
0 commit comments