@@ -19,7 +19,6 @@ use rustc_index::vec::{Idx, IndexVec};
1919use rustc_infer:: infer:: region_constraints:: { Constraint , RegionConstraintData } ;
2020use rustc_middle:: bug;
2121use rustc_middle:: middle:: resolve_lifetime as rl;
22- use rustc_middle:: middle:: stability;
2322use rustc_middle:: ty:: fold:: TypeFolder ;
2423use rustc_middle:: ty:: subst:: { InternalSubsts , Subst } ;
2524use rustc_middle:: ty:: { self , AdtKind , Lift , Ty , TyCtxt } ;
@@ -274,7 +273,7 @@ impl Clean<Item> for doctree::Module<'_> {
274273 attrs,
275274 source : span. clean ( cx) ,
276275 visibility : self . vis . clean ( cx) ,
277- stability : cx. stability ( self . id ) . clean ( cx ) ,
276+ stability : cx. stability ( self . id ) ,
278277 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
279278 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
280279 inner : ModuleItem ( Module { is_crate : self . is_crate , items } ) ,
@@ -914,7 +913,7 @@ impl Clean<Item> for doctree::Function<'_> {
914913 attrs : self . attrs . clean ( cx) ,
915914 source : self . span . clean ( cx) ,
916915 visibility : self . vis . clean ( cx) ,
917- stability : cx. stability ( self . id ) . clean ( cx ) ,
916+ stability : cx. stability ( self . id ) ,
918917 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
919918 def_id : did. to_def_id ( ) ,
920919 inner : FunctionItem ( Function {
@@ -1023,7 +1022,7 @@ impl Clean<Item> for doctree::Trait<'_> {
10231022 source : self . span . clean ( cx) ,
10241023 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
10251024 visibility : self . vis . clean ( cx) ,
1026- stability : cx. stability ( self . id ) . clean ( cx ) ,
1025+ stability : cx. stability ( self . id ) ,
10271026 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
10281027 inner : TraitItem ( Trait {
10291028 auto : self . is_auto . clean ( cx) ,
@@ -1047,7 +1046,7 @@ impl Clean<Item> for doctree::TraitAlias<'_> {
10471046 source : self . span . clean ( cx) ,
10481047 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
10491048 visibility : self . vis . clean ( cx) ,
1050- stability : cx. stability ( self . id ) . clean ( cx ) ,
1049+ stability : cx. stability ( self . id ) ,
10511050 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
10521051 inner : TraitAliasItem ( TraitAlias {
10531052 generics : self . generics . clean ( cx) ,
@@ -1832,7 +1831,7 @@ impl Clean<Item> for doctree::Struct<'_> {
18321831 source : self . span . clean ( cx) ,
18331832 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
18341833 visibility : self . vis . clean ( cx) ,
1835- stability : cx. stability ( self . id ) . clean ( cx ) ,
1834+ stability : cx. stability ( self . id ) ,
18361835 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
18371836 inner : StructItem ( Struct {
18381837 struct_type : self . struct_type ,
@@ -1852,7 +1851,7 @@ impl Clean<Item> for doctree::Union<'_> {
18521851 source : self . span . clean ( cx) ,
18531852 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
18541853 visibility : self . vis . clean ( cx) ,
1855- stability : cx. stability ( self . id ) . clean ( cx ) ,
1854+ stability : cx. stability ( self . id ) ,
18561855 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
18571856 inner : UnionItem ( Union {
18581857 struct_type : self . struct_type ,
@@ -1882,7 +1881,7 @@ impl Clean<Item> for doctree::Enum<'_> {
18821881 source : self . span . clean ( cx) ,
18831882 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
18841883 visibility : self . vis . clean ( cx) ,
1885- stability : cx. stability ( self . id ) . clean ( cx ) ,
1884+ stability : cx. stability ( self . id ) ,
18861885 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
18871886 inner : EnumItem ( Enum {
18881887 variants : self . variants . iter ( ) . map ( |v| v. clean ( cx) ) . collect ( ) ,
@@ -1900,7 +1899,7 @@ impl Clean<Item> for doctree::Variant<'_> {
19001899 attrs : self . attrs . clean ( cx) ,
19011900 source : self . span . clean ( cx) ,
19021901 visibility : Inherited ,
1903- stability : cx. stability ( self . id ) . clean ( cx ) ,
1902+ stability : cx. stability ( self . id ) ,
19041903 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
19051904 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
19061905 inner : VariantItem ( Variant { kind : self . def . clean ( cx) } ) ,
@@ -2049,7 +2048,7 @@ impl Clean<Item> for doctree::Typedef<'_> {
20492048 source : self . span . clean ( cx) ,
20502049 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
20512050 visibility : self . vis . clean ( cx) ,
2052- stability : cx. stability ( self . id ) . clean ( cx ) ,
2051+ stability : cx. stability ( self . id ) ,
20532052 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
20542053 inner : TypedefItem ( Typedef { type_, generics : self . gen . clean ( cx) , item_type } , false ) ,
20552054 }
@@ -2064,7 +2063,7 @@ impl Clean<Item> for doctree::OpaqueTy<'_> {
20642063 source : self . span . clean ( cx) ,
20652064 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
20662065 visibility : self . vis . clean ( cx) ,
2067- stability : cx. stability ( self . id ) . clean ( cx ) ,
2066+ stability : cx. stability ( self . id ) ,
20682067 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
20692068 inner : OpaqueTyItem ( OpaqueTy {
20702069 bounds : self . opaque_ty . bounds . clean ( cx) ,
@@ -2092,7 +2091,7 @@ impl Clean<Item> for doctree::Static<'_> {
20922091 source : self . span . clean ( cx) ,
20932092 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
20942093 visibility : self . vis . clean ( cx) ,
2095- stability : cx. stability ( self . id ) . clean ( cx ) ,
2094+ stability : cx. stability ( self . id ) ,
20962095 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
20972096 inner : StaticItem ( Static {
20982097 type_ : self . type_ . clean ( cx) ,
@@ -2113,7 +2112,7 @@ impl Clean<Item> for doctree::Constant<'_> {
21132112 source : self . span . clean ( cx) ,
21142113 def_id : def_id. to_def_id ( ) ,
21152114 visibility : self . vis . clean ( cx) ,
2116- stability : cx. stability ( self . id ) . clean ( cx ) ,
2115+ stability : cx. stability ( self . id ) ,
21172116 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
21182117 inner : ConstantItem ( Constant {
21192118 type_ : self . type_ . clean ( cx) ,
@@ -2167,7 +2166,7 @@ impl Clean<Vec<Item>> for doctree::Impl<'_> {
21672166 source : self . span . clean ( cx) ,
21682167 def_id : def_id. to_def_id ( ) ,
21692168 visibility : self . vis . clean ( cx) ,
2170- stability : cx. stability ( self . id ) . clean ( cx ) ,
2169+ stability : cx. stability ( self . id ) ,
21712170 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
21722171 inner : ImplItem ( Impl {
21732172 unsafety : self . unsafety ,
@@ -2349,7 +2348,7 @@ impl Clean<Item> for doctree::ForeignItem<'_> {
23492348 source : self . span . clean ( cx) ,
23502349 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
23512350 visibility : self . vis . clean ( cx) ,
2352- stability : cx. stability ( self . id ) . clean ( cx ) ,
2351+ stability : cx. stability ( self . id ) ,
23532352 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
23542353 inner,
23552354 }
@@ -2364,7 +2363,7 @@ impl Clean<Item> for doctree::Macro<'_> {
23642363 attrs : self . attrs . clean ( cx) ,
23652364 source : self . span . clean ( cx) ,
23662365 visibility : Public ,
2367- stability : cx. stability ( self . hid ) . clean ( cx ) ,
2366+ stability : cx. stability ( self . hid ) ,
23682367 deprecation : cx. deprecation ( self . hid ) . clean ( cx) ,
23692368 def_id : self . def_id ,
23702369 inner : MacroItem ( Macro {
@@ -2389,35 +2388,14 @@ impl Clean<Item> for doctree::ProcMacro<'_> {
23892388 attrs : self . attrs . clean ( cx) ,
23902389 source : self . span . clean ( cx) ,
23912390 visibility : Public ,
2392- stability : cx. stability ( self . id ) . clean ( cx ) ,
2391+ stability : cx. stability ( self . id ) ,
23932392 deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
23942393 def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
23952394 inner : ProcMacroItem ( ProcMacro { kind : self . kind , helpers : self . helpers . clean ( cx) } ) ,
23962395 }
23972396 }
23982397}
23992398
2400- impl Clean < Stability > for attr:: Stability {
2401- fn clean ( & self , _: & DocContext < ' _ > ) -> Stability {
2402- Stability {
2403- level : stability:: StabilityLevel :: from_attr_level ( & self . level ) ,
2404- feature : self . feature . to_string ( ) ,
2405- since : match self . level {
2406- attr:: Stable { ref since } => since. to_string ( ) ,
2407- _ => String :: new ( ) ,
2408- } ,
2409- unstable_reason : match self . level {
2410- attr:: Unstable { reason : Some ( ref reason) , .. } => Some ( reason. to_string ( ) ) ,
2411- _ => None ,
2412- } ,
2413- issue : match self . level {
2414- attr:: Unstable { issue, .. } => issue,
2415- _ => None ,
2416- } ,
2417- }
2418- }
2419- }
2420-
24212399impl Clean < Deprecation > for attr:: Deprecation {
24222400 fn clean ( & self , _: & DocContext < ' _ > ) -> Deprecation {
24232401 Deprecation {
0 commit comments