Skip to content

Commit 2218520

Browse files
committed
Auto merge of rust-lang#79680 - Nadrieril:fix-regression-79284, r=jonas-schievink
Fix perf regression caused by rust-lang#79284 rust-lang#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`
2 parents e622543 + 793c40e commit 2218520

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs

+2
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,8 @@ impl<'tcx> Constructor<'tcx> {
697697
/// Returns whether `self` is covered by `other`, i.e. whether `self` is a subset of `other`.
698698
/// For the simple cases, this is simply checking for equality. For the "grouped" constructors,
699699
/// this checks for inclusion.
700+
// We inline because this has a single call site in `Matrix::specialize_constructor`.
701+
#[inline]
700702
pub(super) fn is_covered_by<'p>(&self, pcx: PatCtxt<'_, 'p, 'tcx>, other: &Self) -> bool {
701703
// This must be kept in sync with `is_covered_by_any`.
702704
match (self, other) {

0 commit comments

Comments
 (0)