@@ -32,11 +32,6 @@ pub(crate) struct Pat<'tcx> {
3232
3333#[ derive( Clone , Debug ) ]
3434pub ( crate ) enum PatKind < ' tcx > {
35- StructLike {
36- enum_info : EnumInfo < ' tcx > ,
37- subpatterns : Vec < FieldPat < ' tcx > > ,
38- } ,
39-
4035 Box {
4136 subpattern : Box < Pat < ' tcx > > ,
4237 } ,
@@ -69,9 +64,6 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
6964 match self . kind {
7065 PatKind :: Never => write ! ( f, "!" ) ,
7166 PatKind :: Box { ref subpattern } => write ! ( f, "box {subpattern}" ) ,
72- PatKind :: StructLike { ref enum_info, ref subpatterns } => {
73- ty:: tls:: with ( |tcx| write_struct_like ( f, tcx, self . ty , enum_info, subpatterns) )
74- }
7567 PatKind :: Deref { ref subpattern } => write_ref_like ( f, self . ty , subpattern) ,
7668 PatKind :: Constant { value } => write ! ( f, "{value}" ) ,
7769 PatKind :: Range ( ref range) => write ! ( f, "{range}" ) ,
@@ -104,7 +96,7 @@ pub(crate) enum EnumInfo<'tcx> {
10496 NotEnum ,
10597}
10698
107- fn write_struct_like < ' tcx > (
99+ pub ( crate ) fn write_struct_like < ' tcx > (
108100 f : & mut impl fmt:: Write ,
109101 tcx : TyCtxt < ' _ > ,
110102 ty : Ty < ' tcx > ,
0 commit comments