Remove Clean trait implementation for VariantData fields
This commit is contained in:
parent
961dce44a9
commit
660dc6f393
@ -1839,12 +1839,6 @@ fn clean_variant_data<'tcx>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> Clean<'tcx, Vec<Item>> for hir::VariantData<'tcx> {
|
|
||||||
fn clean(&self, cx: &mut DocContext<'tcx>) -> Vec<Item> {
|
|
||||||
self.fields().iter().map(|x| clean_field(x, cx)).collect()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'tcx> Clean<'tcx, Item> for ty::VariantDef {
|
impl<'tcx> Clean<'tcx, Item> for ty::VariantDef {
|
||||||
fn clean(&self, cx: &mut DocContext<'tcx>) -> Item {
|
fn clean(&self, cx: &mut DocContext<'tcx>) -> Item {
|
||||||
let kind = match self.ctor_kind {
|
let kind = match self.ctor_kind {
|
||||||
@ -1868,7 +1862,9 @@ impl<'tcx> Clean<'tcx, Variant> for hir::VariantData<'tcx> {
|
|||||||
fn clean(&self, cx: &mut DocContext<'tcx>) -> Variant {
|
fn clean(&self, cx: &mut DocContext<'tcx>) -> Variant {
|
||||||
match self {
|
match self {
|
||||||
hir::VariantData::Struct(..) => Variant::Struct(clean_variant_data(self, cx)),
|
hir::VariantData::Struct(..) => Variant::Struct(clean_variant_data(self, cx)),
|
||||||
hir::VariantData::Tuple(..) => Variant::Tuple(self.clean(cx)),
|
hir::VariantData::Tuple(..) => {
|
||||||
|
Variant::Tuple(self.fields().iter().map(|x| clean_field(x, cx)).collect())
|
||||||
|
}
|
||||||
hir::VariantData::Unit(..) => Variant::CLike,
|
hir::VariantData::Unit(..) => Variant::CLike,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user