@@ -19,7 +19,6 @@ use rustc_index::vec::{Idx, IndexVec};
19
19
use rustc_infer:: infer:: region_constraints:: { Constraint , RegionConstraintData } ;
20
20
use rustc_middle:: bug;
21
21
use rustc_middle:: middle:: resolve_lifetime as rl;
22
- use rustc_middle:: middle:: stability;
23
22
use rustc_middle:: ty:: fold:: TypeFolder ;
24
23
use rustc_middle:: ty:: subst:: { InternalSubsts , Subst } ;
25
24
use rustc_middle:: ty:: { self , AdtKind , Lift , Ty , TyCtxt } ;
@@ -274,7 +273,7 @@ impl Clean<Item> for doctree::Module<'_> {
274
273
attrs,
275
274
source : span. clean ( cx) ,
276
275
visibility : self . vis . clean ( cx) ,
277
- stability : cx. stability ( self . id ) . clean ( cx ) ,
276
+ stability : cx. stability ( self . id ) ,
278
277
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
279
278
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
280
279
inner : ModuleItem ( Module { is_crate : self . is_crate , items } ) ,
@@ -914,7 +913,7 @@ impl Clean<Item> for doctree::Function<'_> {
914
913
attrs : self . attrs . clean ( cx) ,
915
914
source : self . span . clean ( cx) ,
916
915
visibility : self . vis . clean ( cx) ,
917
- stability : cx. stability ( self . id ) . clean ( cx ) ,
916
+ stability : cx. stability ( self . id ) ,
918
917
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
919
918
def_id : did. to_def_id ( ) ,
920
919
inner : FunctionItem ( Function {
@@ -1023,7 +1022,7 @@ impl Clean<Item> for doctree::Trait<'_> {
1023
1022
source : self . span . clean ( cx) ,
1024
1023
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
1025
1024
visibility : self . vis . clean ( cx) ,
1026
- stability : cx. stability ( self . id ) . clean ( cx ) ,
1025
+ stability : cx. stability ( self . id ) ,
1027
1026
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1028
1027
inner : TraitItem ( Trait {
1029
1028
auto : self . is_auto . clean ( cx) ,
@@ -1047,7 +1046,7 @@ impl Clean<Item> for doctree::TraitAlias<'_> {
1047
1046
source : self . span . clean ( cx) ,
1048
1047
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
1049
1048
visibility : self . vis . clean ( cx) ,
1050
- stability : cx. stability ( self . id ) . clean ( cx ) ,
1049
+ stability : cx. stability ( self . id ) ,
1051
1050
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1052
1051
inner : TraitAliasItem ( TraitAlias {
1053
1052
generics : self . generics . clean ( cx) ,
@@ -1832,7 +1831,7 @@ impl Clean<Item> for doctree::Struct<'_> {
1832
1831
source : self . span . clean ( cx) ,
1833
1832
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
1834
1833
visibility : self . vis . clean ( cx) ,
1835
- stability : cx. stability ( self . id ) . clean ( cx ) ,
1834
+ stability : cx. stability ( self . id ) ,
1836
1835
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1837
1836
inner : StructItem ( Struct {
1838
1837
struct_type : self . struct_type ,
@@ -1852,7 +1851,7 @@ impl Clean<Item> for doctree::Union<'_> {
1852
1851
source : self . span . clean ( cx) ,
1853
1852
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
1854
1853
visibility : self . vis . clean ( cx) ,
1855
- stability : cx. stability ( self . id ) . clean ( cx ) ,
1854
+ stability : cx. stability ( self . id ) ,
1856
1855
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1857
1856
inner : UnionItem ( Union {
1858
1857
struct_type : self . struct_type ,
@@ -1882,7 +1881,7 @@ impl Clean<Item> for doctree::Enum<'_> {
1882
1881
source : self . span . clean ( cx) ,
1883
1882
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
1884
1883
visibility : self . vis . clean ( cx) ,
1885
- stability : cx. stability ( self . id ) . clean ( cx ) ,
1884
+ stability : cx. stability ( self . id ) ,
1886
1885
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1887
1886
inner : EnumItem ( Enum {
1888
1887
variants : self . variants . iter ( ) . map ( |v| v. clean ( cx) ) . collect ( ) ,
@@ -1900,7 +1899,7 @@ impl Clean<Item> for doctree::Variant<'_> {
1900
1899
attrs : self . attrs . clean ( cx) ,
1901
1900
source : self . span . clean ( cx) ,
1902
1901
visibility : Inherited ,
1903
- stability : cx. stability ( self . id ) . clean ( cx ) ,
1902
+ stability : cx. stability ( self . id ) ,
1904
1903
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1905
1904
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
1906
1905
inner : VariantItem ( Variant { kind : self . def . clean ( cx) } ) ,
@@ -2049,7 +2048,7 @@ impl Clean<Item> for doctree::Typedef<'_> {
2049
2048
source : self . span . clean ( cx) ,
2050
2049
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
2051
2050
visibility : self . vis . clean ( cx) ,
2052
- stability : cx. stability ( self . id ) . clean ( cx ) ,
2051
+ stability : cx. stability ( self . id ) ,
2053
2052
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2054
2053
inner : TypedefItem ( Typedef { type_, generics : self . gen . clean ( cx) , item_type } , false ) ,
2055
2054
}
@@ -2064,7 +2063,7 @@ impl Clean<Item> for doctree::OpaqueTy<'_> {
2064
2063
source : self . span . clean ( cx) ,
2065
2064
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
2066
2065
visibility : self . vis . clean ( cx) ,
2067
- stability : cx. stability ( self . id ) . clean ( cx ) ,
2066
+ stability : cx. stability ( self . id ) ,
2068
2067
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2069
2068
inner : OpaqueTyItem ( OpaqueTy {
2070
2069
bounds : self . opaque_ty . bounds . clean ( cx) ,
@@ -2092,7 +2091,7 @@ impl Clean<Item> for doctree::Static<'_> {
2092
2091
source : self . span . clean ( cx) ,
2093
2092
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
2094
2093
visibility : self . vis . clean ( cx) ,
2095
- stability : cx. stability ( self . id ) . clean ( cx ) ,
2094
+ stability : cx. stability ( self . id ) ,
2096
2095
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2097
2096
inner : StaticItem ( Static {
2098
2097
type_ : self . type_ . clean ( cx) ,
@@ -2113,7 +2112,7 @@ impl Clean<Item> for doctree::Constant<'_> {
2113
2112
source : self . span . clean ( cx) ,
2114
2113
def_id : def_id. to_def_id ( ) ,
2115
2114
visibility : self . vis . clean ( cx) ,
2116
- stability : cx. stability ( self . id ) . clean ( cx ) ,
2115
+ stability : cx. stability ( self . id ) ,
2117
2116
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2118
2117
inner : ConstantItem ( Constant {
2119
2118
type_ : self . type_ . clean ( cx) ,
@@ -2167,7 +2166,7 @@ impl Clean<Vec<Item>> for doctree::Impl<'_> {
2167
2166
source : self . span . clean ( cx) ,
2168
2167
def_id : def_id. to_def_id ( ) ,
2169
2168
visibility : self . vis . clean ( cx) ,
2170
- stability : cx. stability ( self . id ) . clean ( cx ) ,
2169
+ stability : cx. stability ( self . id ) ,
2171
2170
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2172
2171
inner : ImplItem ( Impl {
2173
2172
unsafety : self . unsafety ,
@@ -2349,7 +2348,7 @@ impl Clean<Item> for doctree::ForeignItem<'_> {
2349
2348
source : self . span . clean ( cx) ,
2350
2349
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
2351
2350
visibility : self . vis . clean ( cx) ,
2352
- stability : cx. stability ( self . id ) . clean ( cx ) ,
2351
+ stability : cx. stability ( self . id ) ,
2353
2352
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2354
2353
inner,
2355
2354
}
@@ -2364,7 +2363,7 @@ impl Clean<Item> for doctree::Macro<'_> {
2364
2363
attrs : self . attrs . clean ( cx) ,
2365
2364
source : self . span . clean ( cx) ,
2366
2365
visibility : Public ,
2367
- stability : cx. stability ( self . hid ) . clean ( cx ) ,
2366
+ stability : cx. stability ( self . hid ) ,
2368
2367
deprecation : cx. deprecation ( self . hid ) . clean ( cx) ,
2369
2368
def_id : self . def_id ,
2370
2369
inner : MacroItem ( Macro {
@@ -2389,35 +2388,14 @@ impl Clean<Item> for doctree::ProcMacro<'_> {
2389
2388
attrs : self . attrs . clean ( cx) ,
2390
2389
source : self . span . clean ( cx) ,
2391
2390
visibility : Public ,
2392
- stability : cx. stability ( self . id ) . clean ( cx ) ,
2391
+ stability : cx. stability ( self . id ) ,
2393
2392
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2394
2393
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
2395
2394
inner : ProcMacroItem ( ProcMacro { kind : self . kind , helpers : self . helpers . clean ( cx) } ) ,
2396
2395
}
2397
2396
}
2398
2397
}
2399
2398
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
-
2421
2399
impl Clean < Deprecation > for attr:: Deprecation {
2422
2400
fn clean ( & self , _: & DocContext < ' _ > ) -> Deprecation {
2423
2401
Deprecation {
0 commit comments