Rollup merge of #106356 - aDotInTheVoid:del-ctor-kind, r=jyn514
clean: Remove `ctor_kind` from `VariantStruct`. It's always `None`. r? `@ghost`
This commit is contained in:
commit
a0458d41ba
@ -1960,7 +1960,6 @@ pub(crate) fn clean_variant_def<'tcx>(variant: &ty::VariantDef, cx: &mut DocCont
|
||||
variant.fields.iter().map(|field| clean_middle_field(field, cx)).collect(),
|
||||
),
|
||||
None => VariantKind::Struct(VariantStruct {
|
||||
ctor_kind: None,
|
||||
fields: variant.fields.iter().map(|field| clean_middle_field(field, cx)).collect(),
|
||||
}),
|
||||
};
|
||||
@ -1985,7 +1984,6 @@ fn clean_variant_data<'tcx>(
|
||||
|
||||
let kind = match variant {
|
||||
hir::VariantData::Struct(..) => VariantKind::Struct(VariantStruct {
|
||||
ctor_kind: None,
|
||||
fields: variant.fields().iter().map(|x| clean_field(x, cx)).collect(),
|
||||
}),
|
||||
hir::VariantData::Tuple(..) => {
|
||||
|
@ -2111,7 +2111,6 @@ impl Union {
|
||||
/// only as a variant in an enum.
|
||||
#[derive(Clone, Debug)]
|
||||
pub(crate) struct VariantStruct {
|
||||
pub(crate) ctor_kind: Option<CtorKind>,
|
||||
pub(crate) fields: Vec<Item>,
|
||||
}
|
||||
|
||||
|
@ -1229,16 +1229,7 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
|
||||
w.write_str(")");
|
||||
}
|
||||
clean::VariantKind::Struct(ref s) => {
|
||||
render_struct(
|
||||
w,
|
||||
v,
|
||||
None,
|
||||
s.ctor_kind,
|
||||
&s.fields,
|
||||
" ",
|
||||
false,
|
||||
cx,
|
||||
);
|
||||
render_struct(w, v, None, None, &s.fields, " ", false, cx);
|
||||
}
|
||||
},
|
||||
_ => unreachable!(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user