@@ -8,7 +8,7 @@ use rustc_middle::ty::TyCtxt;
88use rustc_mir_dataflow:: move_paths:: { InitKind , InitLocation , MoveData } ;
99
1010use crate :: borrow_set:: BorrowSet ;
11- use crate :: facts:: AllFacts ;
11+ use crate :: facts:: { AllFacts , PoloniusRegionVid } ;
1212use crate :: location:: LocationTable ;
1313use crate :: type_check:: free_region_relations:: UniversalRegionRelations ;
1414use crate :: universal_regions:: UniversalRegions ;
@@ -137,7 +137,9 @@ fn emit_universal_region_facts(
137137 // the `borrow_set`, their `BorrowIndex` are synthesized as the universal region index
138138 // added to the existing number of loans, as if they succeeded them in the set.
139139 //
140- all_facts. universal_region . extend ( universal_regions. universal_regions ( ) ) ;
140+ all_facts
141+ . universal_region
142+ . extend ( universal_regions. universal_regions ( ) . map ( PoloniusRegionVid :: from) ) ;
141143 let borrow_count = borrow_set. len ( ) ;
142144 debug ! (
143145 "emit_universal_region_facts: polonius placeholders, num_universals={}, borrow_count={}" ,
@@ -148,7 +150,7 @@ fn emit_universal_region_facts(
148150 for universal_region in universal_regions. universal_regions ( ) {
149151 let universal_region_idx = universal_region. index ( ) ;
150152 let placeholder_loan_idx = borrow_count + universal_region_idx;
151- all_facts. placeholder . push ( ( universal_region, placeholder_loan_idx. into ( ) ) ) ;
153+ all_facts. placeholder . push ( ( universal_region. into ( ) , placeholder_loan_idx. into ( ) ) ) ;
152154 }
153155
154156 // 2: the universal region relations `outlives` constraints are emitted as
@@ -160,7 +162,7 @@ fn emit_universal_region_facts(
160162 fr1={:?}, fr2={:?}",
161163 fr1, fr2
162164 ) ;
163- all_facts. known_placeholder_subset . push ( ( fr1, fr2) ) ;
165+ all_facts. known_placeholder_subset . push ( ( fr1. into ( ) , fr2. into ( ) ) ) ;
164166 }
165167 }
166168}
0 commit comments