Skip to content

Commit 3d0945d

Browse files
committed
Implement nnethercote's suggestion
#65160 (comment)
1 parent 60021ce commit 3d0945d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustc_mir/hair/pattern/_match.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,6 +1904,8 @@ fn should_treat_range_exhaustively(tcx: TyCtxt<'tcx>, ctor: &Constructor<'tcx>)
19041904
}
19051905

19061906
/// Checks whether there exists any shared value in either `ctor` or `pat` by intersecting them.
1907+
// This has a single call site that can be hot
1908+
#[inline(always)]
19071909
fn constructor_intersects_pattern<'p, 'tcx>(
19081910
tcx: TyCtxt<'tcx>,
19091911
param_env: ty::ParamEnv<'tcx>,

0 commit comments

Comments
 (0)