@@ -192,6 +192,7 @@ impl<'a, 'tcx, 'rcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx, 'rcx>
192192 visibility : Some ( Public ) ,
193193 stability : get_stability ( cx, def_id) ,
194194 deprecation : get_deprecation ( cx, def_id) ,
195+ non_exhaustive : false ,
195196 def_id,
196197 inner : PrimitiveItem ( prim) ,
197198 }
@@ -204,6 +205,7 @@ impl<'a, 'tcx, 'rcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx, 'rcx>
204205 visibility : Some ( Public ) ,
205206 stability : get_stability ( cx, def_id) ,
206207 deprecation : get_deprecation ( cx, def_id) ,
208+ non_exhaustive : false ,
207209 def_id,
208210 inner : KeywordItem ( kw) ,
209211 }
@@ -366,6 +368,7 @@ pub struct Item {
366368 pub def_id : DefId ,
367369 pub stability : Option < Stability > ,
368370 pub deprecation : Option < Deprecation > ,
371+ pub non_exhaustive : bool ,
369372}
370373
371374impl fmt:: Debug for Item {
@@ -625,6 +628,7 @@ impl Clean<Item> for doctree::Module {
625628 visibility : self . vis . clean ( cx) ,
626629 stability : self . stab . clean ( cx) ,
627630 deprecation : self . depr . clean ( cx) ,
631+ non_exhaustive : false ,
628632 def_id : cx. tcx . hir . local_def_id ( self . id ) ,
629633 inner : ModuleItem ( Module {
630634 is_crate : self . is_crate ,
@@ -2117,6 +2121,7 @@ impl Clean<Item> for doctree::Function {
21172121 visibility : self . vis . clean ( cx) ,
21182122 stability : self . stab . clean ( cx) ,
21192123 deprecation : self . depr . clean ( cx) ,
2124+ non_exhaustive : false ,
21202125 def_id : cx. tcx . hir . local_def_id ( self . id ) ,
21212126 inner : FunctionItem ( Function {
21222127 decl,
@@ -2298,6 +2303,7 @@ impl Clean<Item> for doctree::Trait {
22982303 visibility : self . vis . clean ( cx) ,
22992304 stability : self . stab . clean ( cx) ,
23002305 deprecation : self . depr . clean ( cx) ,
2306+ non_exhaustive : false ,
23012307 inner : TraitItem ( Trait {
23022308 auto : self . is_auto . clean ( cx) ,
23032309 unsafety : self . unsafety ,
@@ -2367,6 +2373,7 @@ impl Clean<Item> for hir::TraitItem {
23672373 visibility : None ,
23682374 stability : get_stability ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
23692375 deprecation : get_deprecation ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
2376+ non_exhaustive : false ,
23702377 inner,
23712378 }
23722379 }
@@ -2395,6 +2402,7 @@ impl Clean<Item> for hir::ImplItem {
23952402 visibility : self . vis . clean ( cx) ,
23962403 stability : get_stability ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
23972404 deprecation : get_deprecation ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
2405+ non_exhaustive : false ,
23982406 inner,
23992407 }
24002408 }
@@ -2541,6 +2549,7 @@ impl<'tcx> Clean<Item> for ty::AssociatedItem {
25412549 visibility,
25422550 stability : get_stability ( cx, self . def_id ) ,
25432551 deprecation : get_deprecation ( cx, self . def_id ) ,
2552+ non_exhaustive : false ,
25442553 def_id : self . def_id ,
25452554 attrs : inline:: load_attrs ( cx, self . def_id ) ,
25462555 source : cx. tcx . def_span ( self . def_id ) . clean ( cx) ,
@@ -3194,6 +3203,7 @@ impl Clean<Item> for hir::StructField {
31943203 visibility : self . vis . clean ( cx) ,
31953204 stability : get_stability ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
31963205 deprecation : get_deprecation ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
3206+ non_exhaustive : false ,
31973207 def_id : cx. tcx . hir . local_def_id ( self . id ) ,
31983208 inner : StructFieldItem ( self . ty . clean ( cx) ) ,
31993209 }
@@ -3209,6 +3219,7 @@ impl<'tcx> Clean<Item> for ty::FieldDef {
32093219 visibility : self . vis . clean ( cx) ,
32103220 stability : get_stability ( cx, self . did ) ,
32113221 deprecation : get_deprecation ( cx, self . did ) ,
3222+ non_exhaustive : false ,
32123223 def_id : self . did ,
32133224 inner : StructFieldItem ( cx. tcx . type_of ( self . did ) . clean ( cx) ) ,
32143225 }
@@ -3273,6 +3284,7 @@ impl Clean<Vec<Item>> for doctree::Struct {
32733284 visibility : self . vis . clean ( cx) ,
32743285 stability : self . stab . clean ( cx) ,
32753286 deprecation : self . depr . clean ( cx) ,
3287+ non_exhaustive : self . non_exhaustive ,
32763288 inner : StructItem ( Struct {
32773289 struct_type : self . struct_type ,
32783290 generics : self . generics . clean ( cx) ,
@@ -3298,6 +3310,7 @@ impl Clean<Vec<Item>> for doctree::Union {
32983310 visibility : self . vis . clean ( cx) ,
32993311 stability : self . stab . clean ( cx) ,
33003312 deprecation : self . depr . clean ( cx) ,
3313+ non_exhaustive : false ,
33013314 inner : UnionItem ( Union {
33023315 struct_type : self . struct_type ,
33033316 generics : self . generics . clean ( cx) ,
@@ -3350,6 +3363,7 @@ impl Clean<Vec<Item>> for doctree::Enum {
33503363 visibility : self . vis . clean ( cx) ,
33513364 stability : self . stab . clean ( cx) ,
33523365 deprecation : self . depr . clean ( cx) ,
3366+ non_exhaustive : self . non_exhaustive ,
33533367 inner : EnumItem ( Enum {
33543368 variants : self . variants . clean ( cx) ,
33553369 generics : self . generics . clean ( cx) ,
@@ -3375,6 +3389,7 @@ impl Clean<Item> for doctree::Variant {
33753389 visibility : None ,
33763390 stability : self . stab . clean ( cx) ,
33773391 deprecation : self . depr . clean ( cx) ,
3392+ non_exhaustive : false ,
33783393 def_id : cx. tcx . hir . local_def_id ( self . def . id ( ) ) ,
33793394 inner : VariantItem ( Variant {
33803395 kind : self . def . clean ( cx) ,
@@ -3405,6 +3420,7 @@ impl<'tcx> Clean<Item> for ty::VariantDef {
34053420 def_id : field. did ,
34063421 stability : get_stability ( cx, field. did ) ,
34073422 deprecation : get_deprecation ( cx, field. did ) ,
3423+ non_exhaustive : false ,
34083424 inner : StructFieldItem ( cx. tcx . type_of ( field. did ) . clean ( cx) )
34093425 }
34103426 } ) . collect ( )
@@ -3420,6 +3436,7 @@ impl<'tcx> Clean<Item> for ty::VariantDef {
34203436 inner : VariantItem ( Variant { kind : kind } ) ,
34213437 stability : get_stability ( cx, self . did ) ,
34223438 deprecation : get_deprecation ( cx, self . did ) ,
3439+ non_exhaustive : false ,
34233440 }
34243441 }
34253442}
@@ -3671,6 +3688,7 @@ impl Clean<Item> for doctree::Typedef {
36713688 visibility : self . vis . clean ( cx) ,
36723689 stability : self . stab . clean ( cx) ,
36733690 deprecation : self . depr . clean ( cx) ,
3691+ non_exhaustive : false ,
36743692 inner : TypedefItem ( Typedef {
36753693 type_ : self . ty . clean ( cx) ,
36763694 generics : self . gen . clean ( cx) ,
@@ -3722,6 +3740,7 @@ impl Clean<Item> for doctree::Static {
37223740 visibility : self . vis . clean ( cx) ,
37233741 stability : self . stab . clean ( cx) ,
37243742 deprecation : self . depr . clean ( cx) ,
3743+ non_exhaustive : false ,
37253744 inner : StaticItem ( Static {
37263745 type_ : self . type_ . clean ( cx) ,
37273746 mutability : self . mutability . clean ( cx) ,
@@ -3747,6 +3766,7 @@ impl Clean<Item> for doctree::Constant {
37473766 visibility : self . vis . clean ( cx) ,
37483767 stability : self . stab . clean ( cx) ,
37493768 deprecation : self . depr . clean ( cx) ,
3769+ non_exhaustive : false ,
37503770 inner : ConstantItem ( Constant {
37513771 type_ : self . type_ . clean ( cx) ,
37523772 expr : print_const_expr ( cx, self . expr ) ,
@@ -3835,6 +3855,7 @@ impl Clean<Vec<Item>> for doctree::Impl {
38353855 visibility : self . vis . clean ( cx) ,
38363856 stability : self . stab . clean ( cx) ,
38373857 deprecation : self . depr . clean ( cx) ,
3858+ non_exhaustive : false ,
38383859 inner : ImplItem ( Impl {
38393860 unsafety : self . unsafety ,
38403861 generics : self . generics . clean ( cx) ,
@@ -3921,6 +3942,7 @@ impl Clean<Item> for doctree::ExternCrate {
39213942 visibility : self . vis . clean ( cx) ,
39223943 stability : None ,
39233944 deprecation : None ,
3945+ non_exhaustive : false ,
39243946 inner : ExternCrateItem ( self . name . clean ( cx) , self . path . clone ( ) )
39253947 }
39263948 }
@@ -3967,6 +3989,7 @@ impl Clean<Vec<Item>> for doctree::Import {
39673989 visibility: self . vis. clean( cx) ,
39683990 stability: None ,
39693991 deprecation: None ,
3992+ non_exhaustive: false ,
39703993 inner: ImportItem ( inner)
39713994 } ]
39723995 }
@@ -4035,6 +4058,7 @@ impl Clean<Item> for hir::ForeignItem {
40354058 visibility : self . vis . clean ( cx) ,
40364059 stability : get_stability ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
40374060 deprecation : get_deprecation ( cx, cx. tcx . hir . local_def_id ( self . id ) ) ,
4061+ non_exhaustive : false ,
40384062 inner,
40394063 }
40404064 }
@@ -4209,6 +4233,7 @@ impl Clean<Item> for doctree::Macro {
42094233 visibility : Some ( Public ) ,
42104234 stability : self . stab . clean ( cx) ,
42114235 deprecation : self . depr . clean ( cx) ,
4236+ non_exhaustive : false ,
42124237 def_id : self . def_id ,
42134238 inner : MacroItem ( Macro {
42144239 source : format ! ( "macro_rules! {} {{\n {}}}" ,
0 commit comments