Skip to content

Commit c3f7e02

Browse files
committed
rename to shrink_to_tcx_lifetime
1 parent c2f7757 commit c3f7e02

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/librustc/traits/query/type_op/eq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for Eq<'tcx> {
4848
tcx.type_op_eq(canonicalized)
4949
}
5050

51-
fn cast_to_tcx_lifetime(
51+
fn shrink_to_tcx_lifetime(
5252
v: &'a CanonicalizedQueryResult<'gcx, ()>,
5353
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>> {
5454
v

src/librustc/traits/query/type_op/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub trait QueryTypeOp<'gcx: 'tcx, 'tcx>: fmt::Debug + Sized {
7272
/// `QueryResult` is. This operation would (maybe) be nicer with
7373
/// something like HKTs or GATs, since then we could make
7474
/// `QueryResult` parametric and `'gcx` and `'tcx` etc.
75-
fn cast_to_tcx_lifetime(
75+
fn shrink_to_tcx_lifetime(
7676
lifted_query_result: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>,
7777
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>>;
7878

@@ -91,7 +91,7 @@ pub trait QueryTypeOp<'gcx: 'tcx, 'tcx>: fmt::Debug + Sized {
9191
let (canonical_self, canonical_var_values) =
9292
infcx.canonicalize_hr_query_hack(&query_key);
9393
let canonical_result = Self::perform_query(infcx.tcx, canonical_self)?;
94-
let canonical_result = Self::cast_to_tcx_lifetime(&canonical_result);
94+
let canonical_result = Self::shrink_to_tcx_lifetime(&canonical_result);
9595

9696
let param_env = Self::param_env(&query_key);
9797

src/librustc/traits/query/type_op/normalize.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ where
5555
T::type_op_method(tcx, canonicalized)
5656
}
5757

58-
fn cast_to_tcx_lifetime(
58+
fn shrink_to_tcx_lifetime(
5959
v: &'a CanonicalizedQueryResult<'gcx, T>,
6060
) -> &'a Canonical<'tcx, QueryResult<'tcx, T>> {
61-
T::cast_to_tcx_lifetime(v)
61+
T::shrink_to_tcx_lifetime(v)
6262
}
6363
}
6464

@@ -70,7 +70,7 @@ pub trait Normalizable<'gcx, 'tcx>: fmt::Debug + TypeFoldable<'tcx> + Lift<'gcx>
7070

7171
/// Convert from the `'gcx` (lifted) form of `Self` into the `tcx`
7272
/// form of `Self`.
73-
fn cast_to_tcx_lifetime(
73+
fn shrink_to_tcx_lifetime(
7474
v: &'a CanonicalizedQueryResult<'gcx, Self>,
7575
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>>;
7676
}
@@ -86,7 +86,7 @@ where
8686
tcx.type_op_normalize_ty(canonicalized)
8787
}
8888

89-
fn cast_to_tcx_lifetime(
89+
fn shrink_to_tcx_lifetime(
9090
v: &'a CanonicalizedQueryResult<'gcx, Self>,
9191
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>> {
9292
v
@@ -104,7 +104,7 @@ where
104104
tcx.type_op_normalize_predicate(canonicalized)
105105
}
106106

107-
fn cast_to_tcx_lifetime(
107+
fn shrink_to_tcx_lifetime(
108108
v: &'a CanonicalizedQueryResult<'gcx, Self>,
109109
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>> {
110110
v
@@ -122,7 +122,7 @@ where
122122
tcx.type_op_normalize_poly_fn_sig(canonicalized)
123123
}
124124

125-
fn cast_to_tcx_lifetime(
125+
fn shrink_to_tcx_lifetime(
126126
v: &'a CanonicalizedQueryResult<'gcx, Self>,
127127
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>> {
128128
v
@@ -140,7 +140,7 @@ where
140140
tcx.type_op_normalize_fn_sig(canonicalized)
141141
}
142142

143-
fn cast_to_tcx_lifetime(
143+
fn shrink_to_tcx_lifetime(
144144
v: &'a CanonicalizedQueryResult<'gcx, Self>,
145145
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self>> {
146146
v

src/librustc/traits/query/type_op/outlives.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ where
6464
tcx.dropck_outlives(canonicalized)
6565
}
6666

67-
fn cast_to_tcx_lifetime(
67+
fn shrink_to_tcx_lifetime(
6868
lifted_query_result: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>,
6969
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>> {
7070
lifted_query_result

src/librustc/traits/query/type_op/prove_predicate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for ProvePredicate<'tcx> {
4646
tcx.type_op_prove_predicate(canonicalized)
4747
}
4848

49-
fn cast_to_tcx_lifetime(
49+
fn shrink_to_tcx_lifetime(
5050
v: &'a CanonicalizedQueryResult<'gcx, ()>,
5151
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>> {
5252
v

src/librustc/traits/query/type_op/subtype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<'gcx: 'tcx, 'tcx> super::QueryTypeOp<'gcx, 'tcx> for Subtype<'tcx> {
5252
tcx.type_op_subtype(canonicalized)
5353
}
5454

55-
fn cast_to_tcx_lifetime(
55+
fn shrink_to_tcx_lifetime(
5656
v: &'a CanonicalizedQueryResult<'gcx, ()>,
5757
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>> {
5858
v

0 commit comments

Comments
 (0)