@@ -73,7 +73,7 @@ pub enum IntercrateMode {
7373/// either identifying an `impl` (e.g., `impl Eq for int`) that
7474/// provides the required vtable, or else finding a bound that is in
7575/// scope. The eventual result is usually a `Selection` (defined below).
76- #[ derive( Clone , PartialEq , Eq ) ]
76+ #[ derive( Clone , PartialEq , Eq , Hash ) ]
7777pub struct Obligation < ' tcx , T > {
7878 pub cause : ObligationCause < ' tcx > ,
7979 pub param_env : ty:: ParamEnv < ' tcx > ,
@@ -85,7 +85,7 @@ pub type PredicateObligation<'tcx> = Obligation<'tcx, ty::Predicate<'tcx>>;
8585pub type TraitObligation < ' tcx > = Obligation < ' tcx , ty:: PolyTraitPredicate < ' tcx > > ;
8686
8787/// Why did we incur this obligation? Used for error reporting.
88- #[ derive( Clone , Debug , PartialEq , Eq ) ]
88+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
8989pub struct ObligationCause < ' tcx > {
9090 pub span : Span ,
9191
@@ -113,7 +113,7 @@ impl<'tcx> ObligationCause<'tcx> {
113113 }
114114}
115115
116- #[ derive( Clone , Debug , PartialEq , Eq ) ]
116+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
117117pub enum ObligationCauseCode < ' tcx > {
118118 /// Not well classified or should be obvious from span.
119119 MiscObligation ,
@@ -215,7 +215,7 @@ pub enum ObligationCauseCode<'tcx> {
215215 BlockTailExpression ( ast:: NodeId ) ,
216216}
217217
218- #[ derive( Clone , Debug , PartialEq , Eq ) ]
218+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
219219pub struct DerivedObligationCause < ' tcx > {
220220 /// The trait reference of the parent obligation that led to the
221221 /// current obligation. Note that only trait obligations lead to
0 commit comments