Skip to content

Commit 48aa819

Browse files
committed
what is going on?
1 parent 3d924a6 commit 48aa819

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/librustc/ty/context.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,12 @@ impl<'a, 'tcx> Lift<'tcx> for Region<'a> {
17301730
if tcx.interners.arena.in_arena(*self as *const _) {
17311731
return Some(unsafe { mem::transmute(*self) });
17321732
}
1733-
Some(tcx.intern_const_alloc(mir::interpret::Allocation::clone(self)))
1733+
// Also try in the global tcx if we're not that.
1734+
if !tcx.is_global() {
1735+
self.lift_to_tcx(tcx.global_tcx())
1736+
} else {
1737+
None
1738+
}
17341739
}
17351740
}
17361741

@@ -1740,12 +1745,7 @@ impl<'a, 'tcx> Lift<'tcx> for Goal<'a> {
17401745
if tcx.interners.arena.in_arena(*self as *const _) {
17411746
return Some(unsafe { mem::transmute(*self) });
17421747
}
1743-
// Also try in the global tcx if we're not that.
1744-
if !tcx.is_global() {
1745-
self.lift_to_tcx(tcx.global_tcx())
1746-
} else {
1747-
None
1748-
}
1748+
Some(tcx.intern_const_alloc(mir::interpret::Allocation::clone(self)))
17491749
}
17501750
}
17511751

0 commit comments

Comments
 (0)