rustc_pattern_analysis no longer needs to be passed an arena
This commit is contained in:
parent
174e73a3f6
commit
db36304102
8 changed files with 19 additions and 42 deletions
|
@ -718,7 +718,7 @@ impl<Cx: TypeCx> Constructor<Cx> {
|
|||
|
||||
/// The number of fields for this constructor. This must be kept in sync with
|
||||
/// `Fields::wildcards`.
|
||||
pub(crate) fn arity(&self, pcx: &PlaceCtxt<'_, '_, Cx>) -> usize {
|
||||
pub(crate) fn arity(&self, pcx: &PlaceCtxt<'_, Cx>) -> usize {
|
||||
pcx.ctor_arity(self)
|
||||
}
|
||||
|
||||
|
@ -727,7 +727,7 @@ impl<Cx: TypeCx> Constructor<Cx> {
|
|||
/// this checks for inclusion.
|
||||
// We inline because this has a single call site in `Matrix::specialize_constructor`.
|
||||
#[inline]
|
||||
pub(crate) fn is_covered_by<'p>(&self, pcx: &PlaceCtxt<'_, 'p, Cx>, other: &Self) -> bool {
|
||||
pub(crate) fn is_covered_by(&self, pcx: &PlaceCtxt<'_, Cx>, other: &Self) -> bool {
|
||||
match (self, other) {
|
||||
(Wildcard, _) => pcx
|
||||
.mcx
|
||||
|
@ -861,7 +861,7 @@ impl<Cx: TypeCx> ConstructorSet<Cx> {
|
|||
#[instrument(level = "debug", skip(self, pcx, ctors), ret)]
|
||||
pub(crate) fn split<'a>(
|
||||
&self,
|
||||
pcx: &PlaceCtxt<'a, '_, Cx>,
|
||||
pcx: &PlaceCtxt<'a, Cx>,
|
||||
ctors: impl Iterator<Item = &'a Constructor<Cx>> + Clone,
|
||||
) -> SplitConstructorSet<Cx> {
|
||||
let mut present: SmallVec<[_; 1]> = SmallVec::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue