Skip to content

Commit

Permalink
Auto merge of #79680 - Nadrieril:fix-regression-79284, r=jonas-schievink
Browse files Browse the repository at this point in the history
Fix perf regression caused by #79284

#79284 only moved code around but this changed inlining and caused a large perf regression. This fixes it for me, though I'm less confident than usual because the regression was not observable with my usual (i.e. incremental) compilation settings.

r? `@Mark-Simulacrum`
  • Loading branch information
bors committed Dec 4, 2020
2 parents e622543 + 793c40e commit 2218520
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2218520

Please sign in to comment.