@@ -52,6 +52,7 @@ use rustc_attr::{Deprecation, StabilityLevel};
5252use rustc_data_structures:: flock;
5353use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
5454use rustc_hir as hir;
55+ use rustc_hir:: def:: CtorKind ;
5556use rustc_hir:: def_id:: { DefId , LOCAL_CRATE } ;
5657use rustc_hir:: Mutability ;
5758use rustc_middle:: middle:: stability;
@@ -67,7 +68,6 @@ use serde::{Serialize, Serializer};
6768use crate :: clean:: { self , AttributesExt , GetDefId , RenderedLink , SelfTy , TypeKind } ;
6869use crate :: config:: { RenderInfo , RenderOptions } ;
6970use crate :: docfs:: { DocFS , PathError } ;
70- use crate :: doctree;
7171use crate :: error:: Error ;
7272use crate :: formats:: cache:: { cache, Cache } ;
7373use crate :: formats:: item_type:: ItemType ;
@@ -3103,7 +3103,7 @@ fn item_struct(
31033103 _ => None ,
31043104 } )
31053105 . peekable ( ) ;
3106- if let doctree :: Plain = s. struct_type {
3106+ if let CtorKind :: Fictive = s. struct_type {
31073107 if fields. peek ( ) . is_some ( ) {
31083108 write ! (
31093109 w,
@@ -3353,7 +3353,7 @@ fn render_struct(
33533353 w : & mut Buffer ,
33543354 it : & clean:: Item ,
33553355 g : Option < & clean:: Generics > ,
3356- ty : doctree :: StructType ,
3356+ ty : CtorKind ,
33573357 fields : & [ clean:: Item ] ,
33583358 tab : & str ,
33593359 structhead : bool ,
@@ -3370,7 +3370,7 @@ fn render_struct(
33703370 write ! ( w, "{}" , g. print( ) )
33713371 }
33723372 match ty {
3373- doctree :: Plain => {
3373+ CtorKind :: Fictive => {
33743374 if let Some ( g) = g {
33753375 write ! ( w, "{}" , WhereClause { gens: g, indent: 0 , end_newline: true } )
33763376 }
@@ -3402,7 +3402,7 @@ fn render_struct(
34023402 }
34033403 write ! ( w, "}}" ) ;
34043404 }
3405- doctree :: Tuple => {
3405+ CtorKind :: Fn => {
34063406 write ! ( w, "(" ) ;
34073407 for ( i, field) in fields. iter ( ) . enumerate ( ) {
34083408 if i > 0 {
@@ -3427,7 +3427,7 @@ fn render_struct(
34273427 }
34283428 write ! ( w, ";" ) ;
34293429 }
3430- doctree :: Unit => {
3430+ CtorKind :: Const => {
34313431 // Needed for PhantomData.
34323432 if let Some ( g) = g {
34333433 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
44624462 let fields = get_struct_fields_name ( & s. fields ) ;
44634463
44644464 if !fields. is_empty ( ) {
4465- if let doctree :: Plain = s. struct_type {
4465+ if let CtorKind :: Fictive = s. struct_type {
44664466 sidebar. push_str ( & format ! (
44674467 "<a class=\" sidebar-title\" href=\" #fields\" >Fields</a>\
44684468 <div class=\" sidebar-links\" >{}</div>",
0 commit comments