Skip to content

Commit 9343c77

Browse files
committed
only reuse regions
1 parent c3fce8e commit 9343c77

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/ty/fold.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for BoundVarReplacer<'a, 'tcx> {
452452
// debruijn index. Then we adjust it to the
453453
// correct depth.
454454
assert_eq!(debruijn1, ty::INNERMOST);
455-
self.tcx.mk_region(ty::ReLateBound(debruijn, br))
455+
self.tcx.reuse_or_mk_region(region, ty::ReLateBound(debruijn, br))
456456
} else {
457457
region
458458
}

0 commit comments

Comments
 (0)