Skip to content

Commit b1b3d50

Browse files
committed
Inline the closure in assemble_candidates_from_impls.
It's really hot on some benchmarks, e.g. `bitmaps-3.1.0`.
1 parent 00f2459 commit b1b3d50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
556556
self.tcx().for_each_relevant_impl(
557557
obligation.predicate.def_id(),
558558
obligation.predicate.skip_binder().trait_ref.self_ty(),
559+
#[inline(always)]
559560
|impl_def_id| {
560561
// Before we create the generic parameters and everything, first
561562
// consider a "quick reject". This avoids creating more types

0 commit comments

Comments
 (0)