File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -662,12 +662,10 @@ impl FromWithTcx<clean::Variant> for Variant {
662662 Tuple ( fields) => Variant :: Tuple (
663663 fields
664664 . into_iter ( )
665- . map ( |f| {
666- if let clean:: StructFieldItem ( ty) = * f. kind {
667- ty. into_tcx ( tcx)
668- } else {
669- unreachable ! ( )
670- }
665+ . filter_map ( |f| match * f. kind {
666+ clean:: StructFieldItem ( ty) => Some ( ty. into_tcx ( tcx) ) ,
667+ clean:: StrippedItem ( _) => None ,
668+ _ => unreachable ! ( ) ,
671669 } )
672670 . collect ( ) ,
673671 ) ,
Original file line number Diff line number Diff line change 1+ // Regression test for <https://github.com/rust-lang/rust/issues/100529>.
2+
3+ #![ no_core]
4+ #![ feature( no_core) ]
5+
6+ // @has enum_variant_hidden.json "$.index[*][?(@.name=='ParseError')]"
7+ // @has - "$.index[*][?(@.name=='UnexpectedEndTag')]"
8+ // @is - "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant_kind" '"tuple"'
9+ // @is - "$.index[*][?(@.name=='UnexpectedEndTag')].inner.variant_inner" []
10+
11+ pub enum ParseError {
12+ UnexpectedEndTag ( #[ doc( hidden) ] u32 ) ,
13+ }
You can’t perform that action at this time.
0 commit comments