about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-06-27 09:27:07 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-06-27 09:27:07 -0400
commitc3f7e02fb6ba3baa30bbbcf373f64ce0c48b1893 (patch)
treeeeace46f4d820bd07e1bb25930cadb511ea2c5a5
parentc2f7757bc5682935555850375af66285d4bcd22f (diff)
downloadrust-c3f7e02fb6ba3baa30bbbcf373f64ce0c48b1893.tar.gz
rust-c3f7e02fb6ba3baa30bbbcf373f64ce0c48b1893.zip
rename to `shrink_to_tcx_lifetime`
-rw-r--r--src/librustc/traits/query/type_op/eq.rs2
-rw-r--r--src/librustc/traits/query/type_op/mod.rs4
-rw-r--r--src/librustc/traits/query/type_op/normalize.rs14
-rw-r--r--src/librustc/traits/query/type_op/outlives.rs2
-rw-r--r--src/librustc/traits/query/type_op/prove_predicate.rs2
-rw-r--r--src/librustc/traits/query/type_op/subtype.rs2
6 files changed, 13 insertions, 13 deletions
diff --git a/src/librustc/traits/query/type_op/eq.rs b/src/librustc/traits/query/type_op/eq.rs
index fc5d174fff4..7d05d0a2656 100644
--- a/src/librustc/traits/query/type_op/eq.rs
+++ b/src/librustc/traits/query/type_op/eq.rs
@@ -48,7 +48,7 @@ impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for Eq<'tcx> {
         tcx.type_op_eq(canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, ()>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>> {
         v
diff --git a/src/librustc/traits/query/type_op/mod.rs b/src/librustc/traits/query/type_op/mod.rs
index b55c0de5b0b..d89d31726cb 100644
--- a/src/librustc/traits/query/type_op/mod.rs
+++ b/src/librustc/traits/query/type_op/mod.rs
@@ -72,7 +72,7 @@ pub trait QueryTypeOp<'gcx: 'tcx, 'tcx>: fmt::Debug + Sized {
     /// `QueryResult` is. This operation would (maybe) be nicer with
     /// something like HKTs or GATs, since then we could make
     /// `QueryResult` parametric and `'gcx` and `'tcx` etc.
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         lifted_query_result: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>>;
 
@@ -91,7 +91,7 @@ pub trait QueryTypeOp<'gcx: 'tcx, 'tcx>: fmt::Debug + Sized {
                 let (canonical_self, canonical_var_values) =
                     infcx.canonicalize_hr_query_hack(&query_key);
                 let canonical_result = Self::perform_query(infcx.tcx, canonical_self)?;
-                let canonical_result = Self::cast_to_tcx_lifetime(&canonical_result);
+                let canonical_result = Self::shrink_to_tcx_lifetime(&canonical_result);
 
                 let param_env = Self::param_env(&query_key);
 
diff --git a/src/librustc/traits/query/type_op/normalize.rs b/src/librustc/traits/query/type_op/normalize.rs
index 5e3a23a5f30..e4d27bccba3 100644
--- a/src/librustc/traits/query/type_op/normalize.rs
+++ b/src/librustc/traits/query/type_op/normalize.rs
@@ -55,10 +55,10 @@ where
         T::type_op_method(tcx, canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, T>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, T>> {
-        T::cast_to_tcx_lifetime(v)
+        T::shrink_to_tcx_lifetime(v)
     }
 }
 
@@ -70,7 +70,7 @@ pub trait Normalizable<'gcx, 'tcx>: fmt::Debug + TypeFoldable<'tcx> + Lift<'gcx>
 
     /// Convert from the `'gcx` (lifted) form of `Self` into the `tcx`
     /// form of `Self`.
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, Self>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>>;
 }
@@ -86,7 +86,7 @@ where
         tcx.type_op_normalize_ty(canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, Self>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>> {
         v
@@ -104,7 +104,7 @@ where
         tcx.type_op_normalize_predicate(canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, Self>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>> {
         v
@@ -122,7 +122,7 @@ where
         tcx.type_op_normalize_poly_fn_sig(canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, Self>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>> {
         v
@@ -140,7 +140,7 @@ where
         tcx.type_op_normalize_fn_sig(canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, Self>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>> {
         v
diff --git a/src/librustc/traits/query/type_op/outlives.rs b/src/librustc/traits/query/type_op/outlives.rs
index 369cefdfb47..cfaed689126 100644
--- a/src/librustc/traits/query/type_op/outlives.rs
+++ b/src/librustc/traits/query/type_op/outlives.rs
@@ -64,7 +64,7 @@ where
         tcx.dropck_outlives(canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         lifted_query_result: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>> {
         lifted_query_result
diff --git a/src/librustc/traits/query/type_op/prove_predicate.rs b/src/librustc/traits/query/type_op/prove_predicate.rs
index c610421e68a..f54710c4805 100644
--- a/src/librustc/traits/query/type_op/prove_predicate.rs
+++ b/src/librustc/traits/query/type_op/prove_predicate.rs
@@ -46,7 +46,7 @@ impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for ProvePredicate<'tcx> {
         tcx.type_op_prove_predicate(canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, ()>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>> {
         v
diff --git a/src/librustc/traits/query/type_op/subtype.rs b/src/librustc/traits/query/type_op/subtype.rs
index 8bb773b4c80..e1589e1a9b6 100644
--- a/src/librustc/traits/query/type_op/subtype.rs
+++ b/src/librustc/traits/query/type_op/subtype.rs
@@ -52,7 +52,7 @@ impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for Subtype<'tcx> {
         tcx.type_op_subtype(canonicalized)
     }
 
-    fn cast_to_tcx_lifetime(
+    fn shrink_to_tcx_lifetime(
         v: &'a CanonicalizedQueryResult<'gcx, ()>,
     ) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>> {
         v