about summary refs log tree commit diff
path: root/src/librustc/ty
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-09-25 15:40:21 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2019-09-27 13:33:50 -0400
commitf226ab4ad97fbc2e183d319616f17998c66f64e8 (patch)
treeca6f28c77f43e3e039c71cfb5513050538b13ca6 /src/librustc/ty
parentd540d44c711d0ef9317aa4b8e8b563321e3c35bb (diff)
downloadrust-f226ab4ad97fbc2e183d319616f17998c66f64e8.tar.gz
rust-f226ab4ad97fbc2e183d319616f17998c66f64e8.zip
Remove lift_to_global
Diffstat (limited to 'src/librustc/ty')
-rw-r--r--src/librustc/ty/context.rs5
-rw-r--r--src/librustc/ty/error.rs2
-rw-r--r--src/librustc/ty/print/pretty.rs2
3 files changed, 2 insertions, 7 deletions
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs
index 2d68ad7fbd5..5986388679f 100644
--- a/src/librustc/ty/context.rs
+++ b/src/librustc/ty/context.rs
@@ -1148,11 +1148,6 @@ impl<'tcx> TyCtxt<'tcx> {
         value.lift_to_tcx(self)
     }
 
-    /// Like lift, but only tries in the global tcx.
-    pub fn lift_to_global<T: ?Sized + Lift<'tcx>>(self, value: &T) -> Option<T::Lifted> {
-        value.lift_to_tcx(self)
-    }
-
     /// Creates a type context and call the closure with a `TyCtxt` reference
     /// to the context. The closure enforces that the type context and any interned
     /// value (types, substs, etc.) can only be used while `ty::tls` has a valid
diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs
index d12039de313..5851a48a8d3 100644
--- a/src/librustc/ty/error.rs
+++ b/src/librustc/ty/error.rs
@@ -193,7 +193,7 @@ impl<'tcx> ty::TyS<'tcx> {
             ty::Adt(def, _) => format!("{} `{}`", def.descr(), tcx.def_path_str(def.did)).into(),
             ty::Foreign(def_id) => format!("extern type `{}`", tcx.def_path_str(def_id)).into(),
             ty::Array(_, n) => {
-                let n = tcx.lift_to_global(&n).unwrap();
+                let n = tcx.lift(&n).unwrap();
                 match n.try_eval_usize(tcx, ty::ParamEnv::empty()) {
                     Some(n) => {
                         format!("array of {} element{}", n, pluralise!(n)).into()
diff --git a/src/librustc/ty/print/pretty.rs b/src/librustc/ty/print/pretty.rs
index 2bc87d6b8ba..e004fa07f2c 100644
--- a/src/librustc/ty/print/pretty.rs
+++ b/src/librustc/ty/print/pretty.rs
@@ -917,7 +917,7 @@ pub trait PrettyPrinter<'tcx>:
                     let min = 1u128 << (bit_size - 1);
                     let max = min - 1;
 
-                    let ty = self.tcx().lift_to_global(&ct.ty).unwrap();
+                    let ty = self.tcx().lift(&ct.ty).unwrap();
                     let size = self.tcx().layout_of(ty::ParamEnv::empty().and(ty))
                         .unwrap()
                         .size;