Skip to content

Commit 84075ba

Browse files
committed
use probe_key_value for shallow_resolve_region
1 parent 9b7df05 commit 84075ba

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • compiler/rustc_infer/src/infer/region_constraints

compiler/rustc_infer/src/infer/region_constraints/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,11 +677,10 @@ impl<'tcx> RegionConstraintCollector<'_, 'tcx> {
677677
tcx: TyCtxt<'tcx>,
678678
vid: ty::RegionVid,
679679
) -> ty::Region<'tcx> {
680-
let mut ut = self.unification_table_mut();
681-
let root_vid = ut.find(vid).vid;
682-
match ut.probe_value(root_vid) {
680+
let (root_vid, value) = self.unification_table_mut().inlined_probe_key_value(vid);
681+
match value {
683682
RegionVariableValue::Known { value } => value,
684-
RegionVariableValue::Unknown { .. } => ty::Region::new_var(tcx, root_vid),
683+
RegionVariableValue::Unknown { .. } => ty::Region::new_var(tcx, root_vid.vid),
685684
}
686685
}
687686

0 commit comments

Comments
 (0)