Skip to content

Commit f14b5d9

Browse files
committed
Inline process_obligation.
It's very hot, and this speeds things up.
1 parent b18a22a commit f14b5d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustc/traits/fulfill.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ impl<'a, 'b, 'gcx, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'gcx,
266266
/// - `Ok(Some(v))` if the predicate is true, presuming that `v` are also true
267267
/// - `Ok(None)` if we don't have enough info to be sure
268268
/// - `Err` if the predicate does not hold
269+
///
270+
/// This is always inlined, despite its size, because it has a single
271+
/// callsite and it is called *very* frequently.
272+
#[inline(always)]
269273
fn process_obligation(&mut self,
270274
pending_obligation: &mut Self::Obligation)
271275
-> Result<Option<Vec<Self::Obligation>>, Self::Error>

0 commit comments

Comments
 (0)