Handle correctly stripped enum variant fields
This commit is contained in:
parent
6ce76091c7
commit
c4a5ac2a77
1 changed files with 4 additions and 6 deletions
|
@ -662,12 +662,10 @@ impl FromWithTcx<clean::Variant> for Variant {
|
|||
Tuple(fields) => Variant::Tuple(
|
||||
fields
|
||||
.into_iter()
|
||||
.map(|f| {
|
||||
if let clean::StructFieldItem(ty) = *f.kind {
|
||||
ty.into_tcx(tcx)
|
||||
} else {
|
||||
unreachable!()
|
||||
}
|
||||
.filter_map(|f| match *f.kind {
|
||||
clean::StructFieldItem(ty) => Some(ty.into_tcx(tcx)),
|
||||
clean::StrippedItem(_) => None,
|
||||
_ => unreachable!(),
|
||||
})
|
||||
.collect(),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue