diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-06-07 09:33:24 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-06-07 20:32:12 +1000 |
| commit | f14b5d9ee6327967fdb69d32fc3c1b7c989acda7 (patch) | |
| tree | b09585a099f9983288a83b9bce3b5e234772d3f4 | |
| parent | b18a22a384001afe1c72b7182406bb44b815e9cf (diff) | |
| download | rust-f14b5d9ee6327967fdb69d32fc3c1b7c989acda7.tar.gz rust-f14b5d9ee6327967fdb69d32fc3c1b7c989acda7.zip | |
Inline `process_obligation`.
It's very hot, and this speeds things up.
| -rw-r--r-- | src/librustc/traits/fulfill.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc/traits/fulfill.rs b/src/librustc/traits/fulfill.rs index af24f3166d7..68ad1e665ad 100644 --- a/src/librustc/traits/fulfill.rs +++ b/src/librustc/traits/fulfill.rs @@ -266,6 +266,10 @@ impl<'a, 'b, 'gcx, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'gcx, /// - `Ok(Some(v))` if the predicate is true, presuming that `v` are also true /// - `Ok(None)` if we don't have enough info to be sure /// - `Err` if the predicate does not hold + /// + /// This is always inlined, despite its size, because it has a single + /// callsite and it is called *very* frequently. + #[inline(always)] fn process_obligation(&mut self, pending_obligation: &mut Self::Obligation) -> Result<Option<Vec<Self::Obligation>>, Self::Error> |
