@@ -227,20 +227,6 @@ impl<'tcx> Clean<GenericBound> for ty::PolyTraitRef<'tcx> {
227227 }
228228}
229229
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-
244230impl Clean < Lifetime > for hir:: Lifetime {
245231 fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Lifetime {
246232 let def = cx. tcx . named_region ( self . hir_id ) ;
@@ -296,12 +282,6 @@ impl Clean<Constant> for hir::ConstArg {
296282 }
297283}
298284
299- impl Clean < Lifetime > for ty:: GenericParamDef {
300- fn clean ( & self , _cx : & mut DocContext < ' _ > ) -> Lifetime {
301- Lifetime ( self . name )
302- }
303- }
304-
305285impl Clean < Option < Lifetime > > for ty:: RegionKind {
306286 fn clean ( & self , _cx : & mut DocContext < ' _ > ) -> Option < Lifetime > {
307287 match * self {
@@ -1764,12 +1744,6 @@ impl Clean<Variant> for hir::VariantData<'_> {
17641744 }
17651745}
17661746
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-
17731747impl Clean < Path > for hir:: Path < ' _ > {
17741748 fn clean ( & self , cx : & mut DocContext < ' _ > ) -> Path {
17751749 Path {
@@ -2193,22 +2167,3 @@ impl Clean<TypeBindingKind> for hir::TypeBindingKind<'_> {
21932167 }
21942168 }
21952169}
2196-
2197- enum SimpleBound {
2198- TraitBound ( Vec < PathSegment > , Vec < SimpleBound > , Vec < GenericParamDef > , hir:: TraitBoundModifier ) ,
2199- Outlives ( Lifetime ) ,
2200- }
2201-
2202- impl From < GenericBound > for SimpleBound {
2203- fn from ( bound : GenericBound ) -> Self {
2204- match bound. clone ( ) {
2205- GenericBound :: Outlives ( l) => SimpleBound :: Outlives ( l) ,
2206- GenericBound :: TraitBound ( t, mod_) => match t. trait_ {
2207- Type :: ResolvedPath { path, .. } => {
2208- SimpleBound :: TraitBound ( path. segments , Vec :: new ( ) , t. generic_params , mod_)
2209- }
2210- _ => panic ! ( "Unexpected bound {:?}" , bound) ,
2211- } ,
2212- }
2213- }
2214- }
0 commit comments