diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2020-12-03 22:22:57 +0000 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2020-12-04 01:45:34 +0000 |
| commit | 793c40e0bdf0778dfa979e757e3cbf9f62eeb22c (patch) | |
| tree | f49ef05263d6eb75b568cb8f0ce60dd6eb50d952 /compiler | |
| parent | 5be3f9f10e9fd59ea03816840a6051413fbdefae (diff) | |
| download | rust-793c40e0bdf0778dfa979e757e3cbf9f62eeb22c.tar.gz rust-793c40e0bdf0778dfa979e757e3cbf9f62eeb22c.zip | |
Inline `is_covered_by`
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs index 3b2eef5a905..8b21a9b24e6 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs @@ -697,6 +697,8 @@ impl<'tcx> Constructor<'tcx> { /// 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, /// 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 { // This must be kept in sync with `is_covered_by_any`. match (self, other) { |
