@@ -32,11 +32,6 @@ pub(crate) struct Pat<'tcx> {
32
32
33
33
#[ derive( Clone , Debug ) ]
34
34
pub ( crate ) enum PatKind < ' tcx > {
35
- StructLike {
36
- enum_info : EnumInfo < ' tcx > ,
37
- subpatterns : Vec < FieldPat < ' tcx > > ,
38
- } ,
39
-
40
35
Box {
41
36
subpattern : Box < Pat < ' tcx > > ,
42
37
} ,
@@ -69,9 +64,6 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
69
64
match self . kind {
70
65
PatKind :: Never => write ! ( f, "!" ) ,
71
66
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
- }
75
67
PatKind :: Deref { ref subpattern } => write_ref_like ( f, self . ty , subpattern) ,
76
68
PatKind :: Constant { value } => write ! ( f, "{value}" ) ,
77
69
PatKind :: Range ( ref range) => write ! ( f, "{range}" ) ,
@@ -104,7 +96,7 @@ pub(crate) enum EnumInfo<'tcx> {
104
96
NotEnum ,
105
97
}
106
98
107
- fn write_struct_like < ' tcx > (
99
+ pub ( crate ) fn write_struct_like < ' tcx > (
108
100
f : & mut impl fmt:: Write ,
109
101
tcx : TyCtxt < ' _ > ,
110
102
ty : Ty < ' tcx > ,
0 commit comments