Remove PatKind::Range
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
use std::fmt;
|
||||
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::thir::PatRange;
|
||||
use rustc_middle::ty::{self, AdtDef, Ty, TyCtxt};
|
||||
use rustc_span::sym;
|
||||
use rustc_target::abi::{FieldIdx, VariantIdx};
|
||||
@@ -33,8 +32,6 @@ pub(crate) struct Pat<'tcx> {
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub(crate) enum PatKind<'tcx> {
|
||||
Range(Box<PatRange<'tcx>>),
|
||||
|
||||
Slice {
|
||||
prefix: Box<[Box<Pat<'tcx>>]>,
|
||||
/// True if this slice-like pattern should include a `..` between the
|
||||
@@ -52,7 +49,6 @@ impl<'tcx> fmt::Display for Pat<'tcx> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self.kind {
|
||||
PatKind::Never => write!(f, "!"),
|
||||
PatKind::Range(ref range) => write!(f, "{range}"),
|
||||
PatKind::Slice { ref prefix, has_dot_dot, ref suffix } => {
|
||||
write_slice_like(f, prefix, has_dot_dot, suffix)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user