Skip to content

Commit 699d3e4

Browse files
committed
shallow resolve to root var
1 parent a2db928 commit 699d3e4

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_infer/src/infer

1 file changed

+3
-1
lines changed

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,9 @@ impl<'tcx> InferCtxt<'tcx> {
11251125
// Note: if these two lines are combined into one we get
11261126
// dynamic borrow errors on `self.inner`.
11271127
let known = self.inner.borrow_mut().type_variables().probe(v).known();
1128-
known.map_or(ty, |t| self.shallow_resolve(t))
1128+
known.map_or(Ty::new_var(self.tcx, self.root_var(v)), |t| {
1129+
self.shallow_resolve(t)
1130+
})
11291131
}
11301132

11311133
ty::IntVar(v) => {

0 commit comments

Comments
 (0)