We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15c7e59 commit 08c8caaCopy full SHA for 08c8caa
compiler/rustc_borrowck/src/type_check/mod.rs
@@ -229,6 +229,22 @@ pub(crate) fn type_check<'mir, 'tcx>(
229
);
230
}
231
232
+ // Convert all regions to nll vars.
233
+ let (opaque_type_key, hidden_type) =
234
+ infcx.tcx.fold_regions((opaque_type_key, hidden_type), |region, _| {
235
+ match region.kind() {
236
+ ty::ReVar(_) => region,
237
+ ty::RePlaceholder(placeholder) => checker
238
+ .borrowck_context
239
+ .constraints
240
+ .placeholder_region(infcx, placeholder),
241
+ _ => ty::Region::new_var(
242
+ infcx.tcx,
243
+ checker.borrowck_context.universal_regions.to_region_vid(region),
244
+ ),
245
+ }
246
+ });
247
+
248
(opaque_type_key, hidden_type)
249
})
250
.collect();
0 commit comments