@@ -227,20 +227,6 @@ impl<'tcx> Clean<GenericBound> for ty::PolyTraitRef<'tcx> {
227
227
}
228
228
}
229
229
230
- impl < ' tcx > Clean < Option < Vec < GenericBound > > > for InternalSubsts < ' tcx > {
231
- fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Option < Vec < GenericBound > > {
232
- let mut v = Vec :: new ( ) ;
233
- v. extend ( self . regions ( ) . filter_map ( |r| r. clean ( cx) ) . map ( GenericBound :: Outlives ) ) ;
234
- v. extend ( self . types ( ) . map ( |t| {
235
- GenericBound :: TraitBound (
236
- PolyTrait { trait_ : t. clean ( cx) , generic_params : Vec :: new ( ) } ,
237
- hir:: TraitBoundModifier :: None ,
238
- )
239
- } ) ) ;
240
- if !v. is_empty ( ) { Some ( v) } else { None }
241
- }
242
- }
243
-
244
230
impl Clean < Lifetime > for hir:: Lifetime {
245
231
fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Lifetime {
246
232
let def = cx. tcx . named_region ( self . hir_id ) ;
@@ -296,12 +282,6 @@ impl Clean<Constant> for hir::ConstArg {
296
282
}
297
283
}
298
284
299
- impl Clean < Lifetime > for ty:: GenericParamDef {
300
- fn clean ( & self , _cx : & mut DocContext < ' _ > ) -> Lifetime {
301
- Lifetime ( self . name )
302
- }
303
- }
304
-
305
285
impl Clean < Option < Lifetime > > for ty:: RegionKind {
306
286
fn clean ( & self , _cx : & mut DocContext < ' _ > ) -> Option < Lifetime > {
307
287
match * self {
@@ -1764,12 +1744,6 @@ impl Clean<Variant> for hir::VariantData<'_> {
1764
1744
}
1765
1745
}
1766
1746
1767
- impl Clean < Span > for rustc_span:: Span {
1768
- fn clean ( & self , _cx : & mut DocContext < ' _ > ) -> Span {
1769
- Span :: from_rustc_span ( * self )
1770
- }
1771
- }
1772
-
1773
1747
impl Clean < Path > for hir:: Path < ' _ > {
1774
1748
fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Path {
1775
1749
Path {
@@ -2211,22 +2185,3 @@ impl Clean<TypeBindingKind> for hir::TypeBindingKind<'_> {
2211
2185
}
2212
2186
}
2213
2187
}
2214
-
2215
- enum SimpleBound {
2216
- TraitBound ( Vec < PathSegment > , Vec < SimpleBound > , Vec < GenericParamDef > , hir:: TraitBoundModifier ) ,
2217
- Outlives ( Lifetime ) ,
2218
- }
2219
-
2220
- impl From < GenericBound > for SimpleBound {
2221
- fn from ( bound : GenericBound ) -> Self {
2222
- match bound. clone ( ) {
2223
- GenericBound :: Outlives ( l) => SimpleBound :: Outlives ( l) ,
2224
- GenericBound :: TraitBound ( t, mod_) => match t. trait_ {
2225
- Type :: ResolvedPath { path, .. } => {
2226
- SimpleBound :: TraitBound ( path. segments , Vec :: new ( ) , t. generic_params , mod_)
2227
- }
2228
- _ => panic ! ( "Unexpected bound {:?}" , bound) ,
2229
- } ,
2230
- }
2231
- }
2232
- }
0 commit comments