@@ -52,6 +52,7 @@ use rustc_attr::{Deprecation, StabilityLevel};
52
52
use rustc_data_structures:: flock;
53
53
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
54
54
use rustc_hir as hir;
55
+ use rustc_hir:: def:: CtorKind ;
55
56
use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
56
57
use rustc_hir:: Mutability ;
57
58
use rustc_middle:: middle:: stability;
@@ -3100,7 +3101,7 @@ fn item_struct(
3100
3101
_ => None ,
3101
3102
} )
3102
3103
. peekable ( ) ;
3103
- if let clean :: StructType :: Plain = s. struct_type {
3104
+ if let CtorKind :: Fictive = s. struct_type {
3104
3105
if fields. peek ( ) . is_some ( ) {
3105
3106
write ! (
3106
3107
w,
@@ -3350,7 +3351,7 @@ fn render_struct(
3350
3351
w : & mut Buffer ,
3351
3352
it : & clean:: Item ,
3352
3353
g : Option < & clean:: Generics > ,
3353
- ty : clean :: StructType ,
3354
+ ty : CtorKind ,
3354
3355
fields : & [ clean:: Item ] ,
3355
3356
tab : & str ,
3356
3357
structhead : bool ,
@@ -3367,7 +3368,7 @@ fn render_struct(
3367
3368
write ! ( w, "{}" , g. print( ) )
3368
3369
}
3369
3370
match ty {
3370
- clean :: StructType :: Plain => {
3371
+ CtorKind :: Fictive => {
3371
3372
if let Some ( g) = g {
3372
3373
write ! ( w, "{}" , WhereClause { gens: g, indent: 0 , end_newline: true } )
3373
3374
}
@@ -3399,7 +3400,7 @@ fn render_struct(
3399
3400
}
3400
3401
write ! ( w, "}}" ) ;
3401
3402
}
3402
- clean :: StructType :: Tuple => {
3403
+ CtorKind :: Fn => {
3403
3404
write ! ( w, "(" ) ;
3404
3405
for ( i, field) in fields. iter ( ) . enumerate ( ) {
3405
3406
if i > 0 {
@@ -3424,7 +3425,7 @@ fn render_struct(
3424
3425
}
3425
3426
write ! ( w, ";" ) ;
3426
3427
}
3427
- clean :: StructType :: Unit => {
3428
+ CtorKind :: Const => {
3428
3429
// Needed for PhantomData.
3429
3430
if let Some ( g) = g {
3430
3431
write ! ( w, "{}" , WhereClause { gens: g, indent: 0 , end_newline: false } )
@@ -4459,7 +4460,7 @@ fn sidebar_struct(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, s: &clea
4459
4460
let fields = get_struct_fields_name ( & s. fields ) ;
4460
4461
4461
4462
if !fields. is_empty ( ) {
4462
- if let clean :: StructType :: Plain = s. struct_type {
4463
+ if let CtorKind :: Fictive = s. struct_type {
4463
4464
sidebar. push_str ( & format ! (
4464
4465
"<a class=\" sidebar-title\" href=\" #fields\" >Fields</a>\
4465
4466
<div class=\" sidebar-links\" >{}</div>",
0 commit comments