@@ -73,7 +73,7 @@ pub enum IntercrateMode {
73
73
/// either identifying an `impl` (e.g., `impl Eq for int`) that
74
74
/// provides the required vtable, or else finding a bound that is in
75
75
/// scope. The eventual result is usually a `Selection` (defined below).
76
- #[ derive( Clone , PartialEq , Eq ) ]
76
+ #[ derive( Clone , PartialEq , Eq , Hash ) ]
77
77
pub struct Obligation < ' tcx , T > {
78
78
pub cause : ObligationCause < ' tcx > ,
79
79
pub param_env : ty:: ParamEnv < ' tcx > ,
@@ -85,7 +85,7 @@ pub type PredicateObligation<'tcx> = Obligation<'tcx, ty::Predicate<'tcx>>;
85
85
pub type TraitObligation < ' tcx > = Obligation < ' tcx , ty:: PolyTraitPredicate < ' tcx > > ;
86
86
87
87
/// Why did we incur this obligation? Used for error reporting.
88
- #[ derive( Clone , Debug , PartialEq , Eq ) ]
88
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
89
89
pub struct ObligationCause < ' tcx > {
90
90
pub span : Span ,
91
91
@@ -113,7 +113,7 @@ impl<'tcx> ObligationCause<'tcx> {
113
113
}
114
114
}
115
115
116
- #[ derive( Clone , Debug , PartialEq , Eq ) ]
116
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
117
117
pub enum ObligationCauseCode < ' tcx > {
118
118
/// Not well classified or should be obvious from span.
119
119
MiscObligation ,
@@ -215,7 +215,7 @@ pub enum ObligationCauseCode<'tcx> {
215
215
BlockTailExpression ( ast:: NodeId ) ,
216
216
}
217
217
218
- #[ derive( Clone , Debug , PartialEq , Eq ) ]
218
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
219
219
pub struct DerivedObligationCause < ' tcx > {
220
220
/// The trait reference of the parent obligation that led to the
221
221
/// current obligation. Note that only trait obligations lead to
@@ -304,7 +304,7 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;
304
304
/// ### The type parameter `N`
305
305
///
306
306
/// See explanation on `VtableImplData`.
307
- #[ derive( Clone , RustcEncodable , RustcDecodable ) ]
307
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable ) ]
308
308
pub enum Vtable < ' tcx , N > {
309
309
/// Vtable identifying a particular impl.
310
310
VtableImpl ( VtableImplData < ' tcx , N > ) ,
@@ -374,13 +374,13 @@ pub struct VtableClosureData<'tcx, N> {
374
374
pub nested : Vec < N >
375
375
}
376
376
377
- #[ derive( Clone , RustcEncodable , RustcDecodable ) ]
377
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable ) ]
378
378
pub struct VtableAutoImplData < N > {
379
379
pub trait_def_id : DefId ,
380
380
pub nested : Vec < N >
381
381
}
382
382
383
- #[ derive( Clone , RustcEncodable , RustcDecodable ) ]
383
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable ) ]
384
384
pub struct VtableBuiltinData < N > {
385
385
pub nested : Vec < N >
386
386
}
0 commit comments