Skip to content

Commit a0458d4

Browse files
authored
Rollup merge of #106356 - aDotInTheVoid:del-ctor-kind, r=jyn514
clean: Remove `ctor_kind` from `VariantStruct`. It's always `None`. r? `@ghost`
2 parents 6e94012 + f1f99c6 commit a0458d4

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

src/librustdoc/clean/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,6 @@ pub(crate) fn clean_variant_def<'tcx>(variant: &ty::VariantDef, cx: &mut DocCont
19601960
variant.fields.iter().map(|field| clean_middle_field(field, cx)).collect(),
19611961
),
19621962
None => VariantKind::Struct(VariantStruct {
1963-
ctor_kind: None,
19641963
fields: variant.fields.iter().map(|field| clean_middle_field(field, cx)).collect(),
19651964
}),
19661965
};
@@ -1985,7 +1984,6 @@ fn clean_variant_data<'tcx>(
19851984

19861985
let kind = match variant {
19871986
hir::VariantData::Struct(..) => VariantKind::Struct(VariantStruct {
1988-
ctor_kind: None,
19891987
fields: variant.fields().iter().map(|x| clean_field(x, cx)).collect(),
19901988
}),
19911989
hir::VariantData::Tuple(..) => {

src/librustdoc/clean/types.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,6 @@ impl Union {
21112111
/// only as a variant in an enum.
21122112
#[derive(Clone, Debug)]
21132113
pub(crate) struct VariantStruct {
2114-
pub(crate) ctor_kind: Option<CtorKind>,
21152114
pub(crate) fields: Vec<Item>,
21162115
}
21172116

src/librustdoc/html/render/print_item.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -1229,16 +1229,7 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
12291229
w.write_str(")");
12301230
}
12311231
clean::VariantKind::Struct(ref s) => {
1232-
render_struct(
1233-
w,
1234-
v,
1235-
None,
1236-
s.ctor_kind,
1237-
&s.fields,
1238-
" ",
1239-
false,
1240-
cx,
1241-
);
1232+
render_struct(w, v, None, None, &s.fields, " ", false, cx);
12421233
}
12431234
},
12441235
_ => unreachable!(),

0 commit comments

Comments
 (0)