1- use crate :: infer:: canonical:: { Canonical , Canonicalized , CanonicalizedQueryResponse , QueryResponse } ;
1+ use crate :: infer:: canonical:: { Canonicalized , CanonicalizedQueryResponse } ;
22use std:: fmt;
33use crate :: traits:: query:: Fallible ;
44use crate :: ty:: fold:: TypeFoldable ;
@@ -38,25 +38,13 @@ where
3838 ) -> Fallible < CanonicalizedQueryResponse < ' tcx , Self :: QueryResponse > > {
3939 T :: type_op_method ( tcx, canonicalized)
4040 }
41-
42- fn shrink_to_tcx_lifetime (
43- v : & ' a CanonicalizedQueryResponse < ' tcx , T > ,
44- ) -> & ' a Canonical < ' tcx , QueryResponse < ' tcx , T > > {
45- T :: shrink_to_tcx_lifetime ( v)
46- }
4741}
4842
4943pub trait Normalizable < ' tcx > : fmt:: Debug + TypeFoldable < ' tcx > + Lift < ' tcx > + Copy {
5044 fn type_op_method (
5145 tcx : TyCtxt < ' tcx > ,
5246 canonicalized : Canonicalized < ' tcx , ParamEnvAnd < ' tcx , Normalize < Self > > > ,
5347 ) -> Fallible < CanonicalizedQueryResponse < ' tcx , Self > > ;
54-
55- /// Converts from the `'tcx` (lifted) form of `Self` into the `tcx`
56- /// form of `Self`.
57- fn shrink_to_tcx_lifetime (
58- v : & ' a CanonicalizedQueryResponse < ' tcx , Self > ,
59- ) -> & ' a Canonical < ' tcx , QueryResponse < ' tcx , Self > > ;
6048}
6149
6250impl Normalizable < ' tcx > for Ty < ' tcx > {
@@ -66,12 +54,6 @@ impl Normalizable<'tcx> for Ty<'tcx> {
6654 ) -> Fallible < CanonicalizedQueryResponse < ' tcx , Self > > {
6755 tcx. type_op_normalize_ty ( canonicalized)
6856 }
69-
70- fn shrink_to_tcx_lifetime (
71- v : & ' a CanonicalizedQueryResponse < ' tcx , Self > ,
72- ) -> & ' a Canonical < ' tcx , QueryResponse < ' tcx , Self > > {
73- v
74- }
7557}
7658
7759impl Normalizable < ' tcx > for ty:: Predicate < ' tcx > {
@@ -81,12 +63,6 @@ impl Normalizable<'tcx> for ty::Predicate<'tcx> {
8163 ) -> Fallible < CanonicalizedQueryResponse < ' tcx , Self > > {
8264 tcx. type_op_normalize_predicate ( canonicalized)
8365 }
84-
85- fn shrink_to_tcx_lifetime (
86- v : & ' a CanonicalizedQueryResponse < ' tcx , Self > ,
87- ) -> & ' a Canonical < ' tcx , QueryResponse < ' tcx , Self > > {
88- v
89- }
9066}
9167
9268impl Normalizable < ' tcx > for ty:: PolyFnSig < ' tcx > {
@@ -96,12 +72,6 @@ impl Normalizable<'tcx> for ty::PolyFnSig<'tcx> {
9672 ) -> Fallible < CanonicalizedQueryResponse < ' tcx , Self > > {
9773 tcx. type_op_normalize_poly_fn_sig ( canonicalized)
9874 }
99-
100- fn shrink_to_tcx_lifetime (
101- v : & ' a CanonicalizedQueryResponse < ' tcx , Self > ,
102- ) -> & ' a Canonical < ' tcx , QueryResponse < ' tcx , Self > > {
103- v
104- }
10575}
10676
10777impl Normalizable < ' tcx > for ty:: FnSig < ' tcx > {
@@ -111,12 +81,6 @@ impl Normalizable<'tcx> for ty::FnSig<'tcx> {
11181 ) -> Fallible < CanonicalizedQueryResponse < ' tcx , Self > > {
11282 tcx. type_op_normalize_fn_sig ( canonicalized)
11383 }
114-
115- fn shrink_to_tcx_lifetime (
116- v : & ' a CanonicalizedQueryResponse < ' tcx , Self > ,
117- ) -> & ' a Canonical < ' tcx , QueryResponse < ' tcx , Self > > {
118- v
119- }
12084}
12185
12286BraceStructTypeFoldableImpl ! {
0 commit comments