@@ -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;
@@ -67,7 +68,6 @@ use serde::{Serialize, Serializer};
67
68
use crate :: clean:: { self , AttributesExt , GetDefId , RenderedLink , SelfTy , TypeKind } ;
68
69
use crate :: config:: { RenderInfo , RenderOptions } ;
69
70
use crate :: docfs:: { DocFS , PathError } ;
70
- use crate :: doctree;
71
71
use crate :: error:: Error ;
72
72
use crate :: formats:: cache:: { cache, Cache } ;
73
73
use crate :: formats:: item_type:: ItemType ;
@@ -3103,7 +3103,7 @@ fn item_struct(
3103
3103
_ => None ,
3104
3104
} )
3105
3105
. peekable ( ) ;
3106
- if let doctree :: Plain = s. struct_type {
3106
+ if let CtorKind :: Fictive = s. struct_type {
3107
3107
if fields. peek ( ) . is_some ( ) {
3108
3108
write ! (
3109
3109
w,
@@ -3353,7 +3353,7 @@ fn render_struct(
3353
3353
w : & mut Buffer ,
3354
3354
it : & clean:: Item ,
3355
3355
g : Option < & clean:: Generics > ,
3356
- ty : doctree :: StructType ,
3356
+ ty : CtorKind ,
3357
3357
fields : & [ clean:: Item ] ,
3358
3358
tab : & str ,
3359
3359
structhead : bool ,
@@ -3370,7 +3370,7 @@ fn render_struct(
3370
3370
write ! ( w, "{}" , g. print( ) )
3371
3371
}
3372
3372
match ty {
3373
- doctree :: Plain => {
3373
+ CtorKind :: Fictive => {
3374
3374
if let Some ( g) = g {
3375
3375
write ! ( w, "{}" , WhereClause { gens: g, indent: 0 , end_newline: true } )
3376
3376
}
@@ -3402,7 +3402,7 @@ fn render_struct(
3402
3402
}
3403
3403
write ! ( w, "}}" ) ;
3404
3404
}
3405
- doctree :: Tuple => {
3405
+ CtorKind :: Fn => {
3406
3406
write ! ( w, "(" ) ;
3407
3407
for ( i, field) in fields. iter ( ) . enumerate ( ) {
3408
3408
if i > 0 {
@@ -3427,7 +3427,7 @@ fn render_struct(
3427
3427
}
3428
3428
write ! ( w, ";" ) ;
3429
3429
}
3430
- doctree :: Unit => {
3430
+ CtorKind :: Const => {
3431
3431
// Needed for PhantomData.
3432
3432
if let Some ( g) = g {
3433
3433
write ! ( w, "{}" , WhereClause { gens: g, indent: 0 , end_newline: false } )
@@ -4462,7 +4462,7 @@ fn sidebar_struct(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, s: &clea
4462
4462
let fields = get_struct_fields_name ( & s. fields ) ;
4463
4463
4464
4464
if !fields. is_empty ( ) {
4465
- if let doctree :: Plain = s. struct_type {
4465
+ if let CtorKind :: Fictive = s. struct_type {
4466
4466
sidebar. push_str ( & format ! (
4467
4467
"<a class=\" sidebar-title\" href=\" #fields\" >Fields</a>\
4468
4468
<div class=\" sidebar-links\" >{}</div>",
0 commit comments