@@ -1294,9 +1294,9 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for traits::WhereClauseAtom<
12941294 use traits:: WhereClauseAtom :: * ;
12951295
12961296 mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
1297- match * self {
1298- Implemented ( ref trait_ref) => trait_ref. hash_stable ( hcx, hasher) ,
1299- ProjectionEq ( ref projection) => projection. hash_stable ( hcx, hasher) ,
1297+ match self {
1298+ Implemented ( trait_ref) => trait_ref. hash_stable ( hcx, hasher) ,
1299+ ProjectionEq ( projection) => projection. hash_stable ( hcx, hasher) ,
13001300 }
13011301 }
13021302}
@@ -1308,54 +1308,59 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for traits::DomainGoal<'tcx>
13081308 use traits:: DomainGoal :: * ;
13091309
13101310 mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
1311- match * self {
1312- Holds ( ref where_clause) |
1313- WellFormed ( ref where_clause) |
1314- FromEnv ( ref where_clause) => where_clause. hash_stable ( hcx, hasher) ,
1315-
1316- WellFormedTy ( ref ty) => ty. hash_stable ( hcx, hasher) ,
1317- FromEnvTy ( ref ty) => ty. hash_stable ( hcx, hasher) ,
1318- RegionOutlives ( ref predicate) => predicate. hash_stable ( hcx, hasher) ,
1319- TypeOutlives ( ref predicate) => predicate. hash_stable ( hcx, hasher) ,
1311+ match self {
1312+ Holds ( where_clause) |
1313+ WellFormed ( where_clause) |
1314+ FromEnv ( where_clause) => where_clause. hash_stable ( hcx, hasher) ,
1315+
1316+ WellFormedTy ( ty) => ty. hash_stable ( hcx, hasher) ,
1317+ FromEnvTy ( ty) => ty. hash_stable ( hcx, hasher) ,
1318+ RegionOutlives ( predicate) => predicate. hash_stable ( hcx, hasher) ,
1319+ TypeOutlives ( predicate) => predicate. hash_stable ( hcx, hasher) ,
13201320 }
13211321 }
13221322}
13231323
1324- impl < ' a , ' tcx > HashStable < StableHashingContext < ' a > > for traits:: LeafGoal < ' tcx > {
1324+ impl < ' a , ' tcx > HashStable < StableHashingContext < ' a > > for traits:: Goal < ' tcx > {
13251325 fn hash_stable < W : StableHasherResult > ( & self ,
13261326 hcx : & mut StableHashingContext < ' a > ,
13271327 hasher : & mut StableHasher < W > ) {
1328- use traits:: LeafGoal :: * ;
1328+ use traits:: Goal :: * ;
13291329
13301330 mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
1331- match * self {
1332- DomainGoal ( ref domain_goal) => domain_goal. hash_stable ( hcx, hasher) ,
1331+ match self {
1332+ Implies ( hypotheses, goal) => {
1333+ hypotheses. hash_stable ( hcx, hasher) ;
1334+ goal. hash_stable ( hcx, hasher) ;
1335+ } ,
1336+ And ( goal1, goal2) => {
1337+ goal1. hash_stable ( hcx, hasher) ;
1338+ goal2. hash_stable ( hcx, hasher) ;
1339+ }
1340+ Not ( goal) => goal. hash_stable ( hcx, hasher) ,
1341+ DomainGoal ( domain_goal) => domain_goal. hash_stable ( hcx, hasher) ,
1342+ Quantified ( quantifier, goal) => {
1343+ quantifier. hash_stable ( hcx, hasher) ;
1344+ goal. hash_stable ( hcx, hasher) ;
1345+ } ,
13331346 }
13341347 }
13351348}
13361349
1337- impl < ' a , ' tcx > HashStable < StableHashingContext < ' a > > for traits:: Goal < ' tcx > {
1350+ impl < ' a , ' tcx > HashStable < StableHashingContext < ' a > > for traits:: Clause < ' tcx > {
13381351 fn hash_stable < W : StableHasherResult > ( & self ,
13391352 hcx : & mut StableHashingContext < ' a > ,
13401353 hasher : & mut StableHasher < W > ) {
1341- use traits:: Goal :: * ;
1354+ use traits:: Clause :: * ;
13421355
13431356 mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
1344- match * self {
1345- Implies ( ref hypotheses, ref goal) => {
1357+ match self {
1358+ Implies ( hypotheses, goal) => {
13461359 hypotheses. hash_stable ( hcx, hasher) ;
13471360 goal. hash_stable ( hcx, hasher) ;
1348- } ,
1349- And ( ref goal1, ref goal2) => {
1350- goal1. hash_stable ( hcx, hasher) ;
1351- goal2. hash_stable ( hcx, hasher) ;
13521361 }
1353- Not ( ref goal) => goal. hash_stable ( hcx, hasher) ,
1354- Leaf ( ref leaf_goal) => leaf_goal. hash_stable ( hcx, hasher) ,
1355- Quantified ( quantifier, ref goal) => {
1356- quantifier. hash_stable ( hcx, hasher) ;
1357- goal. hash_stable ( hcx, hasher) ;
1358- } ,
1362+ DomainGoal ( domain_goal) => domain_goal. hash_stable ( hcx, hasher) ,
1363+ ForAll ( clause) => clause. hash_stable ( hcx, hasher) ,
13591364 }
13601365 }
13611366}
@@ -1364,8 +1369,3 @@ impl_stable_hash_for!(enum traits::QuantifierKind {
13641369 Universal ,
13651370 Existential
13661371} ) ;
1367-
1368- impl_stable_hash_for ! ( struct traits:: ProgramClause <' tcx> {
1369- consequence,
1370- conditions
1371- } ) ;
0 commit comments