@@ -337,6 +337,7 @@ struct AllTypes {
337
337
traits : FxHashSet < ItemEntry > ,
338
338
macros : FxHashSet < ItemEntry > ,
339
339
functions : FxHashSet < ItemEntry > ,
340
+ tests : FxHashSet < ItemEntry > ,
340
341
type_aliases : FxHashSet < ItemEntry > ,
341
342
opaque_tys : FxHashSet < ItemEntry > ,
342
343
statics : FxHashSet < ItemEntry > ,
@@ -357,6 +358,7 @@ impl AllTypes {
357
358
traits : new_set ( 100 ) ,
358
359
macros : new_set ( 100 ) ,
359
360
functions : new_set ( 100 ) ,
361
+ tests : new_set ( 100 ) ,
360
362
type_aliases : new_set ( 100 ) ,
361
363
opaque_tys : new_set ( 100 ) ,
362
364
statics : new_set ( 100 ) ,
@@ -381,6 +383,7 @@ impl AllTypes {
381
383
ItemType :: Trait => self . traits . insert ( ItemEntry :: new ( new_url, name) ) ,
382
384
ItemType :: Macro => self . macros . insert ( ItemEntry :: new ( new_url, name) ) ,
383
385
ItemType :: Function => self . functions . insert ( ItemEntry :: new ( new_url, name) ) ,
386
+ ItemType :: Test => self . tests . insert ( ItemEntry :: new ( new_url, name) ) ,
384
387
ItemType :: TypeAlias => self . type_aliases . insert ( ItemEntry :: new ( new_url, name) ) ,
385
388
ItemType :: OpaqueTy => self . opaque_tys . insert ( ItemEntry :: new ( new_url, name) ) ,
386
389
ItemType :: Static => self . statics . insert ( ItemEntry :: new ( new_url, name) ) ,
@@ -419,6 +422,9 @@ impl AllTypes {
419
422
if !self . functions . is_empty ( ) {
420
423
sections. insert ( ItemSection :: Functions ) ;
421
424
}
425
+ if !self . tests . is_empty ( ) {
426
+ sections. insert ( ItemSection :: Tests ) ;
427
+ }
422
428
if !self . type_aliases . is_empty ( ) {
423
429
sections. insert ( ItemSection :: TypeAliases ) ;
424
430
}
@@ -476,6 +482,7 @@ impl AllTypes {
476
482
print_entries ( f, & self . attribute_macros , ItemSection :: AttributeMacros ) ;
477
483
print_entries ( f, & self . derive_macros , ItemSection :: DeriveMacros ) ;
478
484
print_entries ( f, & self . functions , ItemSection :: Functions ) ;
485
+ print_entries ( f, & self . tests , ItemSection :: Tests ) ;
479
486
print_entries ( f, & self . type_aliases , ItemSection :: TypeAliases ) ;
480
487
print_entries ( f, & self . trait_aliases , ItemSection :: TraitAliases ) ;
481
488
print_entries ( f, & self . opaque_tys , ItemSection :: OpaqueTypes ) ;
@@ -2149,6 +2156,7 @@ pub(crate) enum ItemSection {
2149
2156
Statics ,
2150
2157
Traits ,
2151
2158
Functions ,
2159
+ Tests ,
2152
2160
TypeAliases ,
2153
2161
Unions ,
2154
2162
Implementations ,
@@ -2182,6 +2190,7 @@ impl ItemSection {
2182
2190
Statics ,
2183
2191
Traits ,
2184
2192
Functions ,
2193
+ Tests ,
2185
2194
TypeAliases ,
2186
2195
Unions ,
2187
2196
Implementations ,
@@ -2208,6 +2217,7 @@ impl ItemSection {
2208
2217
Self :: Unions => "unions" ,
2209
2218
Self :: Enums => "enums" ,
2210
2219
Self :: Functions => "functions" ,
2220
+ Self :: Tests => "tests" ,
2211
2221
Self :: TypeAliases => "types" ,
2212
2222
Self :: Statics => "statics" ,
2213
2223
Self :: Constants => "constants" ,
@@ -2238,6 +2248,7 @@ impl ItemSection {
2238
2248
Self :: Unions => "Unions" ,
2239
2249
Self :: Enums => "Enums" ,
2240
2250
Self :: Functions => "Functions" ,
2251
+ Self :: Tests => "Tests" ,
2241
2252
Self :: TypeAliases => "Type Aliases" ,
2242
2253
Self :: Statics => "Statics" ,
2243
2254
Self :: Constants => "Constants" ,
@@ -2269,6 +2280,7 @@ fn item_ty_to_section(ty: ItemType) -> ItemSection {
2269
2280
ItemType :: Union => ItemSection :: Unions ,
2270
2281
ItemType :: Enum => ItemSection :: Enums ,
2271
2282
ItemType :: Function => ItemSection :: Functions ,
2283
+ ItemType :: Test => ItemSection :: Tests ,
2272
2284
ItemType :: TypeAlias => ItemSection :: TypeAliases ,
2273
2285
ItemType :: Static => ItemSection :: Statics ,
2274
2286
ItemType :: Constant => ItemSection :: Constants ,
0 commit comments