rename to shrink_to_tcx_lifetime

This commit is contained in:
Niko Matsakis 2018-06-27 09:27:07 -04:00
parent c2f7757bc5
commit c3f7e02fb6
6 changed files with 13 additions and 13 deletions

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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