Skip to content

Commit b69cca6

Browse files
committed
remove SliceWithSubslice, only used from old trans
1 parent e5c01f4 commit b69cca6

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/librustc_const_eval/check_match.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ pub enum Constructor {
127127
ConstantRange(ConstVal, ConstVal),
128128
/// Array patterns of length n.
129129
Slice(usize),
130-
/// Array patterns with a subslice.
131-
SliceWithSubslice(usize, usize)
132130
}
133131

134132
#[derive(Clone, PartialEq)]
@@ -1042,16 +1040,6 @@ pub fn specialize<'a, 'b, 'tcx>(
10421040
after.iter().map(|p| wpat(p))
10431041
).collect())
10441042
}
1045-
SliceWithSubslice(prefix, suffix)
1046-
if before.len() == prefix
1047-
&& after.len() == suffix
1048-
&& slice.is_some() => {
1049-
// this is used by trans::_match only
1050-
let mut pats: Vec<_> = before.iter()
1051-
.map(|p| (&**p, None)).collect();
1052-
pats.extend(after.iter().map(|p| (&**p, None)));
1053-
Some(pats)
1054-
}
10551043
_ => None
10561044
}
10571045
}

0 commit comments

Comments
 (0)