about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2018-12-23 14:08:04 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-01-01 20:05:03 +0100
commit3d924a6252ee65c1cfe518c9cdc63870e3e62eed (patch)
tree2d678b2ffdfcc39c7131ea851830151178a26824
parentcb933eff350d9ebf81ee31511f54c99e99ab509f (diff)
downloadrust-3d924a6252ee65c1cfe518c9cdc63870e3e62eed.tar.gz
rust-3d924a6252ee65c1cfe518c9cdc63870e3e62eed.zip
Git is drunk
-rw-r--r--src/librustc/ty/context.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs
index dfeab9715cc..ce9be4e8405 100644
--- a/src/librustc/ty/context.rs
+++ b/src/librustc/ty/context.rs
@@ -1730,12 +1730,7 @@ impl<'a, 'tcx> Lift<'tcx> for Region<'a> {
         if tcx.interners.arena.in_arena(*self as *const _) {
             return Some(unsafe { mem::transmute(*self) });
         }
-        // Also try in the global tcx if we're not that.
-        if !tcx.is_global() {
-            self.lift_to_tcx(tcx.global_tcx())
-        } else {
-            None
-        }
+        Some(tcx.intern_const_alloc(mir::interpret::Allocation::clone(self)))
     }
 }
 
@@ -1745,7 +1740,12 @@ impl<'a, 'tcx> Lift<'tcx> for Goal<'a> {
         if tcx.interners.arena.in_arena(*self as *const _) {
             return Some(unsafe { mem::transmute(*self) });
         }
-        Some(tcx.intern_const_alloc(mir::interpret::Allocation::clone(self)))
+        // Also try in the global tcx if we're not that.
+        if !tcx.is_global() {
+            self.lift_to_tcx(tcx.global_tcx())
+        } else {
+            None
+        }
     }
 }