@@ -32,7 +32,7 @@ use std::ops::Index;
32
32
use syntax:: source_map:: Span ;
33
33
use crate :: ty:: fold:: TypeFoldable ;
34
34
use crate :: ty:: subst:: GenericArg ;
35
- use crate :: ty:: { self , BoundVar , Lift , List , Region , TyCtxt } ;
35
+ use crate :: ty:: { self , BoundVar , List , Region , TyCtxt } ;
36
36
37
37
mod canonicalizer;
38
38
@@ -44,7 +44,7 @@ mod substitute;
44
44
/// variables have been rewritten to "canonical vars". These are
45
45
/// numbered starting from 0 in order of first appearance.
46
46
#[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , RustcDecodable , RustcEncodable ) ]
47
- #[ derive( HashStable , TypeFoldable ) ]
47
+ #[ derive( HashStable , TypeFoldable , Lift ) ]
48
48
pub struct Canonical < ' tcx , V > {
49
49
pub max_universe : ty:: UniverseIndex ,
50
50
pub variables : CanonicalVarInfos < ' tcx > ,
@@ -65,7 +65,7 @@ impl<'tcx> UseSpecializedDecodable for CanonicalVarInfos<'tcx> {}
65
65
/// variables. You will need to supply it later to instantiate the
66
66
/// canonicalized query response.
67
67
#[ derive( Clone , Debug , PartialEq , Eq , Hash , RustcDecodable , RustcEncodable ) ]
68
- #[ derive( HashStable , TypeFoldable ) ]
68
+ #[ derive( HashStable , TypeFoldable , Lift ) ]
69
69
pub struct CanonicalVarValues < ' tcx > {
70
70
pub var_values : IndexVec < BoundVar , GenericArg < ' tcx > > ,
71
71
}
@@ -188,15 +188,15 @@ pub enum CanonicalTyVarKind {
188
188
/// After we execute a query with a canonicalized key, we get back a
189
189
/// `Canonical<QueryResponse<..>>`. You can use
190
190
/// `instantiate_query_result` to access the data in this result.
191
- #[ derive( Clone , Debug , HashStable , TypeFoldable ) ]
191
+ #[ derive( Clone , Debug , HashStable , TypeFoldable , Lift ) ]
192
192
pub struct QueryResponse < ' tcx , R > {
193
193
pub var_values : CanonicalVarValues < ' tcx > ,
194
194
pub region_constraints : QueryRegionConstraints < ' tcx > ,
195
195
pub certainty : Certainty ,
196
196
pub value : R ,
197
197
}
198
198
199
- #[ derive( Clone , Debug , Default , HashStable , TypeFoldable ) ]
199
+ #[ derive( Clone , Debug , Default , HashStable , TypeFoldable , Lift ) ]
200
200
pub struct QueryRegionConstraints < ' tcx > {
201
201
pub outlives : Vec < QueryOutlivesConstraint < ' tcx > > ,
202
202
pub member_constraints : Vec < MemberConstraint < ' tcx > > ,
@@ -469,13 +469,6 @@ CloneTypeFoldableImpls! {
469
469
}
470
470
}
471
471
472
- BraceStructLiftImpl ! {
473
- impl <' a, ' tcx, T > Lift <' tcx> for Canonical <' a, T > {
474
- type Lifted = Canonical <' tcx, T :: Lifted >;
475
- max_universe, variables, value
476
- } where T : Lift <' tcx>
477
- }
478
-
479
472
impl < ' tcx > CanonicalVarValues < ' tcx > {
480
473
pub fn len ( & self ) -> usize {
481
474
self . var_values . len ( )
@@ -521,27 +514,6 @@ impl<'a, 'tcx> IntoIterator for &'a CanonicalVarValues<'tcx> {
521
514
}
522
515
}
523
516
524
- BraceStructLiftImpl ! {
525
- impl <' a, ' tcx> Lift <' tcx> for CanonicalVarValues <' a> {
526
- type Lifted = CanonicalVarValues <' tcx>;
527
- var_values,
528
- }
529
- }
530
-
531
- BraceStructLiftImpl ! {
532
- impl <' a, ' tcx, R > Lift <' tcx> for QueryResponse <' a, R > {
533
- type Lifted = QueryResponse <' tcx, R :: Lifted >;
534
- var_values, region_constraints, certainty, value
535
- } where R : Lift <' tcx>
536
- }
537
-
538
- BraceStructLiftImpl ! {
539
- impl <' a, ' tcx> Lift <' tcx> for QueryRegionConstraints <' a> {
540
- type Lifted = QueryRegionConstraints <' tcx>;
541
- outlives, member_constraints
542
- }
543
- }
544
-
545
517
impl < ' tcx > Index < BoundVar > for CanonicalVarValues < ' tcx > {
546
518
type Output = GenericArg < ' tcx > ;
547
519
0 commit comments