@@ -2163,53 +2163,23 @@ impl<'tcx, T: 'tcx + ?Sized> IntoPointer for InternedInSet<'tcx, T> {
2163
2163
}
2164
2164
2165
2165
#[ allow( rustc:: usage_of_ty_tykind) ]
2166
- impl < ' tcx > Borrow < TyKind < ' tcx > > for InternedInSet < ' tcx , WithCachedTypeInfo < TyKind < ' tcx > > > {
2167
- fn borrow < ' a > ( & ' a self ) -> & ' a TyKind < ' tcx > {
2166
+ impl < ' tcx , T > Borrow < T > for InternedInSet < ' tcx , WithCachedTypeInfo < T > > {
2167
+ fn borrow < ' a > ( & ' a self ) -> & ' a T {
2168
2168
& self . 0 . internee
2169
2169
}
2170
2170
}
2171
2171
2172
- impl < ' tcx > PartialEq for InternedInSet < ' tcx , WithCachedTypeInfo < TyKind < ' tcx > > > {
2173
- fn eq ( & self , other : & InternedInSet < ' tcx , WithCachedTypeInfo < TyKind < ' tcx > > > ) -> bool {
2172
+ impl < ' tcx , T : PartialEq > PartialEq for InternedInSet < ' tcx , WithCachedTypeInfo < T > > {
2173
+ fn eq ( & self , other : & InternedInSet < ' tcx , WithCachedTypeInfo < T > > ) -> bool {
2174
2174
// The `Borrow` trait requires that `x.borrow() == y.borrow()` equals
2175
2175
// `x == y`.
2176
2176
self . 0 . internee == other. 0 . internee
2177
2177
}
2178
2178
}
2179
2179
2180
- impl < ' tcx > Eq for InternedInSet < ' tcx , WithCachedTypeInfo < TyKind < ' tcx > > > { }
2180
+ impl < ' tcx , T : Eq > Eq for InternedInSet < ' tcx , WithCachedTypeInfo < T > > { }
2181
2181
2182
- impl < ' tcx > Hash for InternedInSet < ' tcx , WithCachedTypeInfo < TyKind < ' tcx > > > {
2183
- fn hash < H : Hasher > ( & self , s : & mut H ) {
2184
- // The `Borrow` trait requires that `x.borrow().hash(s) == x.hash(s)`.
2185
- self . 0 . internee . hash ( s)
2186
- }
2187
- }
2188
-
2189
- impl < ' tcx > Borrow < Binder < ' tcx , PredicateKind < ' tcx > > >
2190
- for InternedInSet < ' tcx , WithCachedTypeInfo < ty:: Binder < ' tcx , PredicateKind < ' tcx > > > >
2191
- {
2192
- fn borrow < ' a > ( & ' a self ) -> & ' a Binder < ' tcx , PredicateKind < ' tcx > > {
2193
- & self . 0 . internee
2194
- }
2195
- }
2196
-
2197
- impl < ' tcx > PartialEq
2198
- for InternedInSet < ' tcx , WithCachedTypeInfo < ty:: Binder < ' tcx , PredicateKind < ' tcx > > > >
2199
- {
2200
- fn eq (
2201
- & self ,
2202
- other : & InternedInSet < ' tcx , WithCachedTypeInfo < ty:: Binder < ' tcx , PredicateKind < ' tcx > > > > ,
2203
- ) -> bool {
2204
- // The `Borrow` trait requires that `x.borrow() == y.borrow()` equals
2205
- // `x == y`.
2206
- self . 0 . internee == other. 0 . internee
2207
- }
2208
- }
2209
-
2210
- impl < ' tcx > Eq for InternedInSet < ' tcx , WithCachedTypeInfo < ty:: Binder < ' tcx , PredicateKind < ' tcx > > > > { }
2211
-
2212
- impl < ' tcx > Hash for InternedInSet < ' tcx , WithCachedTypeInfo < ty:: Binder < ' tcx , PredicateKind < ' tcx > > > > {
2182
+ impl < ' tcx , T : Hash > Hash for InternedInSet < ' tcx , WithCachedTypeInfo < T > > {
2213
2183
fn hash < H : Hasher > ( & self , s : & mut H ) {
2214
2184
// The `Borrow` trait requires that `x.borrow().hash(s) == x.hash(s)`.
2215
2185
self . 0 . internee . hash ( s)
0 commit comments