@@ -192,6 +192,7 @@ impl<'a, 'tcx, 'rcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx, 'rcx>
192
192
visibility : Some ( Public ) ,
193
193
stability : get_stability ( cx, def_id) ,
194
194
deprecation : get_deprecation ( cx, def_id) ,
195
+ non_exhaustive : false ,
195
196
def_id,
196
197
inner : PrimitiveItem ( prim) ,
197
198
}
@@ -204,6 +205,7 @@ impl<'a, 'tcx, 'rcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx, 'rcx>
204
205
visibility : Some ( Public ) ,
205
206
stability : get_stability ( cx, def_id) ,
206
207
deprecation : get_deprecation ( cx, def_id) ,
208
+ non_exhaustive : false ,
207
209
def_id,
208
210
inner : KeywordItem ( kw) ,
209
211
}
@@ -366,6 +368,7 @@ pub struct Item {
366
368
pub def_id : DefId ,
367
369
pub stability : Option < Stability > ,
368
370
pub deprecation : Option < Deprecation > ,
371
+ pub non_exhaustive : bool ,
369
372
}
370
373
371
374
impl fmt:: Debug for Item {
@@ -625,6 +628,7 @@ impl Clean<Item> for doctree::Module {
625
628
visibility : self . vis . clean ( cx) ,
626
629
stability : self . stab . clean ( cx) ,
627
630
deprecation : self . depr . clean ( cx) ,
631
+ non_exhaustive : false ,
628
632
def_id : cx. tcx . hir . local_def_id ( self . id ) ,
629
633
inner : ModuleItem ( Module {
630
634
is_crate : self . is_crate ,
@@ -2117,6 +2121,7 @@ impl Clean<Item> for doctree::Function {
2117
2121
visibility : self . vis . clean ( cx) ,
2118
2122
stability : self . stab . clean ( cx) ,
2119
2123
deprecation : self . depr . clean ( cx) ,
2124
+ non_exhaustive : false ,
2120
2125
def_id : cx. tcx . hir . local_def_id ( self . id ) ,
2121
2126
inner : FunctionItem ( Function {
2122
2127
decl,
@@ -2298,6 +2303,7 @@ impl Clean<Item> for doctree::Trait {
2298
2303
visibility : self . vis . clean ( cx) ,
2299
2304
stability : self . stab . clean ( cx) ,
2300
2305
deprecation : self . depr . clean ( cx) ,
2306
+ non_exhaustive : false ,
2301
2307
inner : TraitItem ( Trait {
2302
2308
auto : self . is_auto . clean ( cx) ,
2303
2309
unsafety : self . unsafety ,
@@ -2367,6 +2373,7 @@ impl Clean<Item> for hir::TraitItem {
2367
2373
visibility : None ,
2368
2374
stability : get_stability ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
2369
2375
deprecation : get_deprecation ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
2376
+ non_exhaustive : false ,
2370
2377
inner,
2371
2378
}
2372
2379
}
@@ -2395,6 +2402,7 @@ impl Clean<Item> for hir::ImplItem {
2395
2402
visibility : self . vis . clean ( cx) ,
2396
2403
stability : get_stability ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
2397
2404
deprecation : get_deprecation ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
2405
+ non_exhaustive : false ,
2398
2406
inner,
2399
2407
}
2400
2408
}
@@ -2541,6 +2549,7 @@ impl<'tcx> Clean<Item> for ty::AssociatedItem {
2541
2549
visibility,
2542
2550
stability : get_stability ( cx, self . def_id ) ,
2543
2551
deprecation : get_deprecation ( cx, self . def_id ) ,
2552
+ non_exhaustive : false ,
2544
2553
def_id : self . def_id ,
2545
2554
attrs : inline:: load_attrs ( cx, self . def_id ) ,
2546
2555
source : cx. tcx . def_span ( self . def_id ) . clean ( cx) ,
@@ -3194,6 +3203,7 @@ impl Clean<Item> for hir::StructField {
3194
3203
visibility : self . vis . clean ( cx) ,
3195
3204
stability : get_stability ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
3196
3205
deprecation : get_deprecation ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
3206
+ non_exhaustive : false ,
3197
3207
def_id : cx. tcx . hir . local_def_id ( self . id ) ,
3198
3208
inner : StructFieldItem ( self . ty . clean ( cx) ) ,
3199
3209
}
@@ -3209,6 +3219,7 @@ impl<'tcx> Clean<Item> for ty::FieldDef {
3209
3219
visibility : self . vis . clean ( cx) ,
3210
3220
stability : get_stability ( cx, self . did ) ,
3211
3221
deprecation : get_deprecation ( cx, self . did ) ,
3222
+ non_exhaustive : false ,
3212
3223
def_id : self . did ,
3213
3224
inner : StructFieldItem ( cx. tcx . type_of ( self . did ) . clean ( cx) ) ,
3214
3225
}
@@ -3273,6 +3284,7 @@ impl Clean<Vec<Item>> for doctree::Struct {
3273
3284
visibility : self . vis . clean ( cx) ,
3274
3285
stability : self . stab . clean ( cx) ,
3275
3286
deprecation : self . depr . clean ( cx) ,
3287
+ non_exhaustive : self . non_exhaustive ,
3276
3288
inner : StructItem ( Struct {
3277
3289
struct_type : self . struct_type ,
3278
3290
generics : self . generics . clean ( cx) ,
@@ -3298,6 +3310,7 @@ impl Clean<Vec<Item>> for doctree::Union {
3298
3310
visibility : self . vis . clean ( cx) ,
3299
3311
stability : self . stab . clean ( cx) ,
3300
3312
deprecation : self . depr . clean ( cx) ,
3313
+ non_exhaustive : false ,
3301
3314
inner : UnionItem ( Union {
3302
3315
struct_type : self . struct_type ,
3303
3316
generics : self . generics . clean ( cx) ,
@@ -3350,6 +3363,7 @@ impl Clean<Vec<Item>> for doctree::Enum {
3350
3363
visibility : self . vis . clean ( cx) ,
3351
3364
stability : self . stab . clean ( cx) ,
3352
3365
deprecation : self . depr . clean ( cx) ,
3366
+ non_exhaustive : self . non_exhaustive ,
3353
3367
inner : EnumItem ( Enum {
3354
3368
variants : self . variants . clean ( cx) ,
3355
3369
generics : self . generics . clean ( cx) ,
@@ -3375,6 +3389,7 @@ impl Clean<Item> for doctree::Variant {
3375
3389
visibility : None ,
3376
3390
stability : self . stab . clean ( cx) ,
3377
3391
deprecation : self . depr . clean ( cx) ,
3392
+ non_exhaustive : false ,
3378
3393
def_id : cx. tcx . hir . local_def_id ( self . def . id ( ) ) ,
3379
3394
inner : VariantItem ( Variant {
3380
3395
kind : self . def . clean ( cx) ,
@@ -3405,6 +3420,7 @@ impl<'tcx> Clean<Item> for ty::VariantDef {
3405
3420
def_id : field. did ,
3406
3421
stability : get_stability ( cx, field. did ) ,
3407
3422
deprecation : get_deprecation ( cx, field. did ) ,
3423
+ non_exhaustive : false ,
3408
3424
inner : StructFieldItem ( cx. tcx . type_of ( field. did ) . clean ( cx) )
3409
3425
}
3410
3426
} ) . collect ( )
@@ -3420,6 +3436,7 @@ impl<'tcx> Clean<Item> for ty::VariantDef {
3420
3436
inner : VariantItem ( Variant { kind : kind } ) ,
3421
3437
stability : get_stability ( cx, self . did ) ,
3422
3438
deprecation : get_deprecation ( cx, self . did ) ,
3439
+ non_exhaustive : false ,
3423
3440
}
3424
3441
}
3425
3442
}
@@ -3671,6 +3688,7 @@ impl Clean<Item> for doctree::Typedef {
3671
3688
visibility : self . vis . clean ( cx) ,
3672
3689
stability : self . stab . clean ( cx) ,
3673
3690
deprecation : self . depr . clean ( cx) ,
3691
+ non_exhaustive : false ,
3674
3692
inner : TypedefItem ( Typedef {
3675
3693
type_ : self . ty . clean ( cx) ,
3676
3694
generics : self . gen . clean ( cx) ,
@@ -3722,6 +3740,7 @@ impl Clean<Item> for doctree::Static {
3722
3740
visibility : self . vis . clean ( cx) ,
3723
3741
stability : self . stab . clean ( cx) ,
3724
3742
deprecation : self . depr . clean ( cx) ,
3743
+ non_exhaustive : false ,
3725
3744
inner : StaticItem ( Static {
3726
3745
type_ : self . type_ . clean ( cx) ,
3727
3746
mutability : self . mutability . clean ( cx) ,
@@ -3747,6 +3766,7 @@ impl Clean<Item> for doctree::Constant {
3747
3766
visibility : self . vis . clean ( cx) ,
3748
3767
stability : self . stab . clean ( cx) ,
3749
3768
deprecation : self . depr . clean ( cx) ,
3769
+ non_exhaustive : false ,
3750
3770
inner : ConstantItem ( Constant {
3751
3771
type_ : self . type_ . clean ( cx) ,
3752
3772
expr : print_const_expr ( cx, self . expr ) ,
@@ -3835,6 +3855,7 @@ impl Clean<Vec<Item>> for doctree::Impl {
3835
3855
visibility : self . vis . clean ( cx) ,
3836
3856
stability : self . stab . clean ( cx) ,
3837
3857
deprecation : self . depr . clean ( cx) ,
3858
+ non_exhaustive : false ,
3838
3859
inner : ImplItem ( Impl {
3839
3860
unsafety : self . unsafety ,
3840
3861
generics : self . generics . clean ( cx) ,
@@ -3921,6 +3942,7 @@ impl Clean<Item> for doctree::ExternCrate {
3921
3942
visibility : self . vis . clean ( cx) ,
3922
3943
stability : None ,
3923
3944
deprecation : None ,
3945
+ non_exhaustive : false ,
3924
3946
inner : ExternCrateItem ( self . name . clean ( cx) , self . path . clone ( ) )
3925
3947
}
3926
3948
}
@@ -3967,6 +3989,7 @@ impl Clean<Vec<Item>> for doctree::Import {
3967
3989
visibility: self . vis. clean( cx) ,
3968
3990
stability: None ,
3969
3991
deprecation: None ,
3992
+ non_exhaustive: false ,
3970
3993
inner: ImportItem ( inner)
3971
3994
} ]
3972
3995
}
@@ -4035,6 +4058,7 @@ impl Clean<Item> for hir::ForeignItem {
4035
4058
visibility : self . vis . clean ( cx) ,
4036
4059
stability : get_stability ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
4037
4060
deprecation : get_deprecation ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
4061
+ non_exhaustive : false ,
4038
4062
inner,
4039
4063
}
4040
4064
}
@@ -4209,6 +4233,7 @@ impl Clean<Item> for doctree::Macro {
4209
4233
visibility : Some ( Public ) ,
4210
4234
stability : self . stab . clean ( cx) ,
4211
4235
deprecation : self . depr . clean ( cx) ,
4236
+ non_exhaustive : false ,
4212
4237
def_id : self . def_id ,
4213
4238
inner : MacroItem ( Macro {
4214
4239
source : format ! ( "macro_rules! {} {{\n {}}}" ,
0 commit comments