@@ -8,7 +8,7 @@ use rustc_middle::ty::TyCtxt;
8
8
use rustc_mir_dataflow:: move_paths:: { InitKind , InitLocation , MoveData } ;
9
9
10
10
use crate :: borrow_set:: BorrowSet ;
11
- use crate :: facts:: AllFacts ;
11
+ use crate :: facts:: { AllFacts , PoloniusRegionVid } ;
12
12
use crate :: location:: LocationTable ;
13
13
use crate :: type_check:: free_region_relations:: UniversalRegionRelations ;
14
14
use crate :: universal_regions:: UniversalRegions ;
@@ -137,7 +137,9 @@ fn emit_universal_region_facts(
137
137
// the `borrow_set`, their `BorrowIndex` are synthesized as the universal region index
138
138
// added to the existing number of loans, as if they succeeded them in the set.
139
139
//
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) ) ;
141
143
let borrow_count = borrow_set. len ( ) ;
142
144
debug ! (
143
145
"emit_universal_region_facts: polonius placeholders, num_universals={}, borrow_count={}" ,
@@ -148,7 +150,7 @@ fn emit_universal_region_facts(
148
150
for universal_region in universal_regions. universal_regions ( ) {
149
151
let universal_region_idx = universal_region. index ( ) ;
150
152
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 ( ) ) ) ;
152
154
}
153
155
154
156
// 2: the universal region relations `outlives` constraints are emitted as
@@ -160,7 +162,7 @@ fn emit_universal_region_facts(
160
162
fr1={:?}, fr2={:?}",
161
163
fr1, fr2
162
164
) ;
163
- all_facts. known_placeholder_subset . push ( ( fr1, fr2) ) ;
165
+ all_facts. known_placeholder_subset . push ( ( fr1. into ( ) , fr2. into ( ) ) ) ;
164
166
}
165
167
}
166
168
}
0 commit comments