@@ -27,19 +27,11 @@ pub(crate) struct FieldPat<'tcx> {
2727pub ( crate ) struct Pat < ' tcx > {
2828 #[ allow( dead_code) ]
2929 pub ( crate ) ty : Ty < ' tcx > ,
30- pub ( crate ) kind : PatKind < ' tcx > ,
30+ pub ( crate ) kind : PatKind ,
3131}
3232
3333#[ derive( Clone , Debug ) ]
34- pub ( crate ) enum PatKind < ' tcx > {
35- Slice {
36- prefix : Box < [ Box < Pat < ' tcx > > ] > ,
37- /// True if this slice-like pattern should include a `..` between the
38- /// prefix and suffix.
39- has_dot_dot : bool ,
40- suffix : Box < [ Box < Pat < ' tcx > > ] > ,
41- } ,
42-
34+ pub ( crate ) enum PatKind {
4335 Never ,
4436
4537 Print ( String ) ,
@@ -49,9 +41,6 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
4941 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
5042 match self . kind {
5143 PatKind :: Never => write ! ( f, "!" ) ,
52- PatKind :: Slice { ref prefix, has_dot_dot, ref suffix } => {
53- write_slice_like ( f, prefix, has_dot_dot, suffix)
54- }
5544 PatKind :: Print ( ref string) => write ! ( f, "{string}" ) ,
5645 }
5746 }
@@ -173,7 +162,7 @@ pub(crate) fn write_ref_like<'tcx>(
173162 write ! ( f, "{subpattern}" )
174163}
175164
176- fn write_slice_like < ' tcx > (
165+ pub ( crate ) fn write_slice_like < ' tcx > (
177166 f : & mut impl fmt:: Write ,
178167 prefix : & [ Box < Pat < ' tcx > > ] ,
179168 has_dot_dot : bool ,
0 commit comments