@@ -42,7 +42,7 @@ use utils::*;
42
42
pub use utils:: { get_auto_trait_and_blanket_impls, krate, register_res} ;
43
43
44
44
pub use self :: types:: FnRetTy :: * ;
45
- pub use self :: types:: ItemEnum :: * ;
45
+ pub use self :: types:: ItemKind :: * ;
46
46
pub use self :: types:: SelfTy :: * ;
47
47
pub use self :: types:: Type :: * ;
48
48
pub use self :: types:: Visibility :: { Inherited , Public } ;
@@ -276,7 +276,7 @@ impl Clean<Item> for doctree::Module<'_> {
276
276
stability : cx. stability ( self . id ) ,
277
277
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
278
278
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
279
- inner : ModuleItem ( Module { is_crate : self . is_crate , items } ) ,
279
+ kind : ModuleItem ( Module { is_crate : self . is_crate , items } ) ,
280
280
}
281
281
}
282
282
}
@@ -916,7 +916,7 @@ impl Clean<Item> for doctree::Function<'_> {
916
916
stability : cx. stability ( self . id ) ,
917
917
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
918
918
def_id : did. to_def_id ( ) ,
919
- inner : FunctionItem ( Function {
919
+ kind : FunctionItem ( Function {
920
920
decl,
921
921
generics,
922
922
header : hir:: FnHeader { constness, ..self . header } ,
@@ -1023,7 +1023,7 @@ impl Clean<Item> for doctree::Trait<'_> {
1023
1023
visibility : self . vis . clean ( cx) ,
1024
1024
stability : cx. stability ( self . id ) ,
1025
1025
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1026
- inner : TraitItem ( Trait {
1026
+ kind : TraitItem ( Trait {
1027
1027
auto : self . is_auto . clean ( cx) ,
1028
1028
unsafety : self . unsafety ,
1029
1029
items : self . items . iter ( ) . map ( |ti| ti. clean ( cx) ) . collect ( ) ,
@@ -1047,7 +1047,7 @@ impl Clean<Item> for doctree::TraitAlias<'_> {
1047
1047
visibility : self . vis . clean ( cx) ,
1048
1048
stability : cx. stability ( self . id ) ,
1049
1049
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1050
- inner : TraitAliasItem ( TraitAlias {
1050
+ kind : TraitAliasItem ( TraitAlias {
1051
1051
generics : self . generics . clean ( cx) ,
1052
1052
bounds : self . bounds . clean ( cx) ,
1053
1053
} ) ,
@@ -1102,7 +1102,7 @@ impl Clean<TypeKind> for hir::def::DefKind {
1102
1102
impl Clean < Item > for hir:: TraitItem < ' _ > {
1103
1103
fn clean ( & self , cx : & DocContext < ' _ > ) -> Item {
1104
1104
let local_did = cx. tcx . hir ( ) . local_def_id ( self . hir_id ) ;
1105
- let inner = match self . kind {
1105
+ let kind = match self . kind {
1106
1106
hir:: TraitItemKind :: Const ( ref ty, default) => {
1107
1107
AssocConstItem ( ty. clean ( cx) , default. map ( |e| print_const_expr ( cx, e) ) )
1108
1108
}
@@ -1140,15 +1140,15 @@ impl Clean<Item> for hir::TraitItem<'_> {
1140
1140
visibility : Visibility :: Inherited ,
1141
1141
stability : get_stability ( cx, local_did. to_def_id ( ) ) ,
1142
1142
deprecation : get_deprecation ( cx, local_did. to_def_id ( ) ) ,
1143
- inner ,
1143
+ kind ,
1144
1144
}
1145
1145
}
1146
1146
}
1147
1147
1148
1148
impl Clean < Item > for hir:: ImplItem < ' _ > {
1149
1149
fn clean ( & self , cx : & DocContext < ' _ > ) -> Item {
1150
1150
let local_did = cx. tcx . hir ( ) . local_def_id ( self . hir_id ) ;
1151
- let inner = match self . kind {
1151
+ let kind = match self . kind {
1152
1152
hir:: ImplItemKind :: Const ( ref ty, expr) => {
1153
1153
AssocConstItem ( ty. clean ( cx) , Some ( print_const_expr ( cx, expr) ) )
1154
1154
}
@@ -1175,14 +1175,14 @@ impl Clean<Item> for hir::ImplItem<'_> {
1175
1175
visibility : self . vis . clean ( cx) ,
1176
1176
stability : get_stability ( cx, local_did. to_def_id ( ) ) ,
1177
1177
deprecation : get_deprecation ( cx, local_did. to_def_id ( ) ) ,
1178
- inner ,
1178
+ kind ,
1179
1179
}
1180
1180
}
1181
1181
}
1182
1182
1183
1183
impl Clean < Item > for ty:: AssocItem {
1184
1184
fn clean ( & self , cx : & DocContext < ' _ > ) -> Item {
1185
- let inner = match self . kind {
1185
+ let kind = match self . kind {
1186
1186
ty:: AssocKind :: Const => {
1187
1187
let ty = cx. tcx . type_of ( self . def_id ) ;
1188
1188
let default = if self . defaultness . has_value ( ) {
@@ -1343,7 +1343,7 @@ impl Clean<Item> for ty::AssocItem {
1343
1343
def_id : self . def_id ,
1344
1344
attrs : inline:: load_attrs ( cx, self . def_id ) . clean ( cx) ,
1345
1345
source : cx. tcx . def_span ( self . def_id ) . clean ( cx) ,
1346
- inner ,
1346
+ kind ,
1347
1347
}
1348
1348
}
1349
1349
}
@@ -1784,7 +1784,7 @@ impl Clean<Item> for hir::StructField<'_> {
1784
1784
stability : get_stability ( cx, local_did. to_def_id ( ) ) ,
1785
1785
deprecation : get_deprecation ( cx, local_did. to_def_id ( ) ) ,
1786
1786
def_id : local_did. to_def_id ( ) ,
1787
- inner : StructFieldItem ( self . ty . clean ( cx) ) ,
1787
+ kind : StructFieldItem ( self . ty . clean ( cx) ) ,
1788
1788
}
1789
1789
}
1790
1790
}
@@ -1799,7 +1799,7 @@ impl Clean<Item> for ty::FieldDef {
1799
1799
stability : get_stability ( cx, self . did ) ,
1800
1800
deprecation : get_deprecation ( cx, self . did ) ,
1801
1801
def_id : self . did ,
1802
- inner : StructFieldItem ( cx. tcx . type_of ( self . did ) . clean ( cx) ) ,
1802
+ kind : StructFieldItem ( cx. tcx . type_of ( self . did ) . clean ( cx) ) ,
1803
1803
}
1804
1804
}
1805
1805
}
@@ -1835,7 +1835,7 @@ impl Clean<Item> for doctree::Struct<'_> {
1835
1835
visibility : self . vis . clean ( cx) ,
1836
1836
stability : cx. stability ( self . id ) ,
1837
1837
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1838
- inner : StructItem ( Struct {
1838
+ kind : StructItem ( Struct {
1839
1839
struct_type : self . struct_type ,
1840
1840
generics : self . generics . clean ( cx) ,
1841
1841
fields : self . fields . clean ( cx) ,
@@ -1855,7 +1855,7 @@ impl Clean<Item> for doctree::Union<'_> {
1855
1855
visibility : self . vis . clean ( cx) ,
1856
1856
stability : cx. stability ( self . id ) ,
1857
1857
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1858
- inner : UnionItem ( Union {
1858
+ kind : UnionItem ( Union {
1859
1859
struct_type : self . struct_type ,
1860
1860
generics : self . generics . clean ( cx) ,
1861
1861
fields : self . fields . clean ( cx) ,
@@ -1885,7 +1885,7 @@ impl Clean<Item> for doctree::Enum<'_> {
1885
1885
visibility : self . vis . clean ( cx) ,
1886
1886
stability : cx. stability ( self . id ) ,
1887
1887
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1888
- inner : EnumItem ( Enum {
1888
+ kind : EnumItem ( Enum {
1889
1889
variants : self . variants . iter ( ) . map ( |v| v. clean ( cx) ) . collect ( ) ,
1890
1890
generics : self . generics . clean ( cx) ,
1891
1891
variants_stripped : false ,
@@ -1904,7 +1904,7 @@ impl Clean<Item> for doctree::Variant<'_> {
1904
1904
stability : cx. stability ( self . id ) ,
1905
1905
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
1906
1906
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
1907
- inner : VariantItem ( Variant { kind : self . def . clean ( cx) } ) ,
1907
+ kind : VariantItem ( Variant { kind : self . def . clean ( cx) } ) ,
1908
1908
}
1909
1909
}
1910
1910
}
@@ -1930,7 +1930,7 @@ impl Clean<Item> for ty::VariantDef {
1930
1930
def_id : field. did ,
1931
1931
stability : get_stability ( cx, field. did ) ,
1932
1932
deprecation : get_deprecation ( cx, field. did ) ,
1933
- inner : StructFieldItem ( cx. tcx . type_of ( field. did ) . clean ( cx) ) ,
1933
+ kind : StructFieldItem ( cx. tcx . type_of ( field. did ) . clean ( cx) ) ,
1934
1934
} )
1935
1935
. collect ( ) ,
1936
1936
} ) ,
@@ -1941,7 +1941,7 @@ impl Clean<Item> for ty::VariantDef {
1941
1941
source : cx. tcx . def_span ( self . def_id ) . clean ( cx) ,
1942
1942
visibility : Inherited ,
1943
1943
def_id : self . def_id ,
1944
- inner : VariantItem ( Variant { kind } ) ,
1944
+ kind : VariantItem ( Variant { kind } ) ,
1945
1945
stability : get_stability ( cx, self . def_id ) ,
1946
1946
deprecation : get_deprecation ( cx, self . def_id ) ,
1947
1947
}
@@ -2057,7 +2057,7 @@ impl Clean<Item> for doctree::Typedef<'_> {
2057
2057
visibility : self . vis . clean ( cx) ,
2058
2058
stability : cx. stability ( self . id ) ,
2059
2059
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2060
- inner : TypedefItem ( Typedef { type_, generics : self . gen . clean ( cx) , item_type } , false ) ,
2060
+ kind : TypedefItem ( Typedef { type_, generics : self . gen . clean ( cx) , item_type } , false ) ,
2061
2061
}
2062
2062
}
2063
2063
}
@@ -2072,7 +2072,7 @@ impl Clean<Item> for doctree::OpaqueTy<'_> {
2072
2072
visibility : self . vis . clean ( cx) ,
2073
2073
stability : cx. stability ( self . id ) ,
2074
2074
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2075
- inner : OpaqueTyItem ( OpaqueTy {
2075
+ kind : OpaqueTyItem ( OpaqueTy {
2076
2076
bounds : self . opaque_ty . bounds . clean ( cx) ,
2077
2077
generics : self . opaque_ty . generics . clean ( cx) ,
2078
2078
} ) ,
@@ -2100,7 +2100,7 @@ impl Clean<Item> for doctree::Static<'_> {
2100
2100
visibility : self . vis . clean ( cx) ,
2101
2101
stability : cx. stability ( self . id ) ,
2102
2102
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2103
- inner : StaticItem ( Static {
2103
+ kind : StaticItem ( Static {
2104
2104
type_ : self . type_ . clean ( cx) ,
2105
2105
mutability : self . mutability ,
2106
2106
expr : print_const_expr ( cx, self . expr ) ,
@@ -2121,7 +2121,7 @@ impl Clean<Item> for doctree::Constant<'_> {
2121
2121
visibility : self . vis . clean ( cx) ,
2122
2122
stability : cx. stability ( self . id ) ,
2123
2123
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2124
- inner : ConstantItem ( Constant {
2124
+ kind : ConstantItem ( Constant {
2125
2125
type_ : self . type_ . clean ( cx) ,
2126
2126
expr : print_const_expr ( cx, self . expr ) ,
2127
2127
value : print_evaluated_const ( cx, def_id. to_def_id ( ) ) ,
@@ -2175,7 +2175,7 @@ impl Clean<Vec<Item>> for doctree::Impl<'_> {
2175
2175
visibility : self . vis . clean ( cx) ,
2176
2176
stability : cx. stability ( self . id ) ,
2177
2177
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2178
- inner : ImplItem ( Impl {
2178
+ kind : ImplItem ( Impl {
2179
2179
unsafety : self . unsafety ,
2180
2180
generics : self . generics . clean ( cx) ,
2181
2181
provided_trait_methods : provided. clone ( ) ,
@@ -2231,7 +2231,7 @@ impl Clean<Vec<Item>> for doctree::ExternCrate<'_> {
2231
2231
visibility: self . vis. clean( cx) ,
2232
2232
stability: None ,
2233
2233
deprecation: None ,
2234
- inner : ExternCrateItem ( self . name. clean( cx) , self . path. clone( ) ) ,
2234
+ kind : ExternCrateItem ( self . name. clean( cx) , self . path. clone( ) ) ,
2235
2235
} ]
2236
2236
}
2237
2237
}
@@ -2302,7 +2302,7 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
2302
2302
visibility : self . vis . clean ( cx) ,
2303
2303
stability : None ,
2304
2304
deprecation : None ,
2305
- inner : ImportItem ( Import :: new_simple (
2305
+ kind : ImportItem ( Import :: new_simple (
2306
2306
self . name . clean ( cx) ,
2307
2307
resolve_use_source ( cx, path) ,
2308
2308
false ,
@@ -2322,14 +2322,14 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
2322
2322
visibility: self . vis. clean( cx) ,
2323
2323
stability: None ,
2324
2324
deprecation: None ,
2325
- inner : ImportItem ( inner) ,
2325
+ kind : ImportItem ( inner) ,
2326
2326
} ]
2327
2327
}
2328
2328
}
2329
2329
2330
2330
impl Clean < Item > for doctree:: ForeignItem < ' _ > {
2331
2331
fn clean ( & self , cx : & DocContext < ' _ > ) -> Item {
2332
- let inner = match self . kind {
2332
+ let kind = match self . kind {
2333
2333
hir:: ForeignItemKind :: Fn ( ref decl, ref names, ref generics) => {
2334
2334
let abi = cx. tcx . hir ( ) . get_foreign_abi ( self . id ) ;
2335
2335
let ( generics, decl) =
@@ -2364,7 +2364,7 @@ impl Clean<Item> for doctree::ForeignItem<'_> {
2364
2364
visibility : self . vis . clean ( cx) ,
2365
2365
stability : cx. stability ( self . id ) ,
2366
2366
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2367
- inner ,
2367
+ kind ,
2368
2368
}
2369
2369
}
2370
2370
}
@@ -2380,7 +2380,7 @@ impl Clean<Item> for doctree::Macro<'_> {
2380
2380
stability : cx. stability ( self . hid ) ,
2381
2381
deprecation : cx. deprecation ( self . hid ) . clean ( cx) ,
2382
2382
def_id : self . def_id ,
2383
- inner : MacroItem ( Macro {
2383
+ kind : MacroItem ( Macro {
2384
2384
source : format ! (
2385
2385
"macro_rules! {} {{\n {}}}" ,
2386
2386
name,
@@ -2405,7 +2405,7 @@ impl Clean<Item> for doctree::ProcMacro<'_> {
2405
2405
stability : cx. stability ( self . id ) ,
2406
2406
deprecation : cx. deprecation ( self . id ) . clean ( cx) ,
2407
2407
def_id : cx. tcx . hir ( ) . local_def_id ( self . id ) . to_def_id ( ) ,
2408
- inner : ProcMacroItem ( ProcMacro { kind : self . kind , helpers : self . helpers . clean ( cx) } ) ,
2408
+ kind : ProcMacroItem ( ProcMacro { kind : self . kind , helpers : self . helpers . clean ( cx) } ) ,
2409
2409
}
2410
2410
}
2411
2411
}
0 commit comments