Inline is_covered_by
This commit is contained in:
parent
5be3f9f10e
commit
793c40e0bd
1 changed files with 2 additions and 0 deletions
|
@ -697,6 +697,8 @@ impl<'tcx> Constructor<'tcx> {
|
||||||
/// Returns whether `self` is covered by `other`, i.e. whether `self` is a subset of `other`.
|
/// Returns whether `self` is covered by `other`, i.e. whether `self` is a subset of `other`.
|
||||||
/// For the simple cases, this is simply checking for equality. For the "grouped" constructors,
|
/// For the simple cases, this is simply checking for equality. For the "grouped" constructors,
|
||||||
/// this checks for inclusion.
|
/// this checks for inclusion.
|
||||||
|
// We inline because this has a single call site in `Matrix::specialize_constructor`.
|
||||||
|
#[inline]
|
||||||
pub(super) fn is_covered_by<'p>(&self, pcx: PatCtxt<'_, 'p, 'tcx>, other: &Self) -> bool {
|
pub(super) fn is_covered_by<'p>(&self, pcx: PatCtxt<'_, 'p, 'tcx>, other: &Self) -> bool {
|
||||||
// This must be kept in sync with `is_covered_by_any`.
|
// This must be kept in sync with `is_covered_by_any`.
|
||||||
match (self, other) {
|
match (self, other) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue