@@ -7,7 +7,7 @@ use crate::cast::{Cast, CastTo};
7
7
use crate :: fold:: shift:: Shift ;
8
8
use crate :: fold:: { Fold , Folder , Subst , SuperFold } ;
9
9
use crate :: visit:: { SuperVisit , Visit , VisitExt , VisitResult , Visitor } ;
10
- use chalk_derive:: { Fold , HasInterner , SuperVisit , Visit } ;
10
+ use chalk_derive:: { Fold , HasInterner , SuperVisit , Visit , Zip } ;
11
11
use chalk_engine:: fallible:: * ;
12
12
use std:: iter;
13
13
use std:: marker:: PhantomData ;
@@ -602,7 +602,7 @@ impl DebruijnIndex {
602
602
/// known. It is referenced within the type using `^1`, indicating
603
603
/// a bound type with debruijn index 1 (i.e., skipping through one
604
604
/// level of binder).
605
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
605
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
606
606
pub struct DynTy < I : Interner > {
607
607
pub bounds : Binders < QuantifiedWhereClauses < I > > ,
608
608
}
@@ -719,7 +719,7 @@ impl PlaceholderIndex {
719
719
}
720
720
721
721
// Fold derive intentionally omitted, folded through Ty
722
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
722
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
723
723
pub struct ApplicationTy < I : Interner > {
724
724
pub name : TypeName < I > ,
725
725
pub substitution : Substitution < I > ,
@@ -884,7 +884,7 @@ impl<I: Interner> ParameterData<I> {
884
884
}
885
885
}
886
886
887
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
887
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
888
888
pub enum AliasTy < I : Interner > {
889
889
Projection ( ProjectionTy < I > ) ,
890
890
Opaque ( OpaqueTy < I > ) ,
@@ -908,19 +908,19 @@ impl<I: Interner> AliasTy<I> {
908
908
}
909
909
}
910
910
911
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
911
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
912
912
pub struct ProjectionTy < I : Interner > {
913
913
pub associated_ty_id : AssocTypeId < I > ,
914
914
pub substitution : Substitution < I > ,
915
915
}
916
916
917
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
917
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
918
918
pub struct OpaqueTy < I : Interner > {
919
919
pub opaque_ty_id : OpaqueTyId < I > ,
920
920
pub substitution : Substitution < I > ,
921
921
}
922
922
923
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
923
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
924
924
pub struct TraitRef < I : Interner > {
925
925
pub trait_id : TraitId < I > ,
926
926
pub substitution : Substitution < I > ,
@@ -948,13 +948,13 @@ impl<I: Interner> TraitRef<I> {
948
948
}
949
949
950
950
/// Where clauses that can be written by a Rust programmer.
951
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , SuperVisit , HasInterner ) ]
951
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , SuperVisit , HasInterner , Zip ) ]
952
952
pub enum WhereClause < I : Interner > {
953
953
Implemented ( TraitRef < I > ) ,
954
954
AliasEq ( AliasEq < I > ) ,
955
955
}
956
956
957
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
957
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
958
958
pub enum WellFormed < I : Interner > {
959
959
/// A predicate which is true is some trait ref is well-formed.
960
960
/// For example, given the following trait definitions:
@@ -984,7 +984,7 @@ pub enum WellFormed<I: Interner> {
984
984
Ty ( Ty < I > ) ,
985
985
}
986
986
987
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
987
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
988
988
pub enum FromEnv < I : Interner > {
989
989
/// A predicate which enables deriving everything which should be true if we *know* that
990
990
/// some trait ref is well-formed. For example given the above trait definitions, we can use
@@ -1016,7 +1016,7 @@ pub enum FromEnv<I: Interner> {
1016
1016
/// A "domain goal" is a goal that is directly about Rust, rather than a pure
1017
1017
/// logical statement. As much as possible, the Chalk solver should avoid
1018
1018
/// decomposing this enum, and instead treat its values opaquely.
1019
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , SuperVisit , HasInterner ) ]
1019
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , SuperVisit , HasInterner , Zip ) ]
1020
1020
pub enum DomainGoal < I : Interner > {
1021
1021
Holds ( WhereClause < I > ) ,
1022
1022
@@ -1201,7 +1201,7 @@ impl<I: Interner> DomainGoal<I> {
1201
1201
}
1202
1202
}
1203
1203
1204
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit ) ]
1204
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , Zip ) ]
1205
1205
pub struct EqGoal < I : Interner > {
1206
1206
pub a : Parameter < I > ,
1207
1207
pub b : Parameter < I > ,
@@ -1211,14 +1211,14 @@ pub struct EqGoal<I: Interner> {
1211
1211
/// type. A projection `T::Foo` normalizes to the type `U` if we can
1212
1212
/// **match it to an impl** and that impl has a `type Foo = V` where
1213
1213
/// `U = V`.
1214
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit ) ]
1214
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , Zip ) ]
1215
1215
pub struct Normalize < I : Interner > {
1216
1216
pub alias : AliasTy < I > ,
1217
1217
pub ty : Ty < I > ,
1218
1218
}
1219
1219
1220
1220
/// Proves **equality** between an alias and a type.
1221
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit ) ]
1221
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , Zip ) ]
1222
1222
pub struct AliasEq < I : Interner > {
1223
1223
pub alias : AliasTy < I > ,
1224
1224
pub ty : Ty < I > ,
@@ -1398,7 +1398,7 @@ where
1398
1398
/// Represents one clause of the form `consequence :- conditions` where
1399
1399
/// `conditions = cond_1 && cond_2 && ...` is the conjunction of the individual
1400
1400
/// conditions.
1401
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
1401
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
1402
1402
pub struct ProgramClauseImplication < I : Interner > {
1403
1403
pub consequence : DomainGoal < I > ,
1404
1404
pub conditions : Goals < I > ,
@@ -1421,7 +1421,7 @@ impl std::ops::BitAnd for ClausePriority {
1421
1421
}
1422
1422
}
1423
1423
1424
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , HasInterner ) ]
1424
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , HasInterner , Zip ) ]
1425
1425
pub enum ProgramClauseData < I : Interner > {
1426
1426
Implies ( ProgramClauseImplication < I > ) ,
1427
1427
ForAll ( Binders < ProgramClauseImplication < I > > ) ,
@@ -1860,7 +1860,7 @@ where
1860
1860
}
1861
1861
}
1862
1862
1863
- #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner ) ]
1863
+ #[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
1864
1864
/// A general goal; this is the full range of questions you can pose to Chalk.
1865
1865
pub enum GoalData < I : Interner > {
1866
1866
/// Introduces a binding at depth 0, shifting other bindings up
0 commit comments