Auto merge of #77908 - bugadani:obl-forest, r=nnethercote
Try to make ObligationForest more efficient This PR tries to decrease the number of allocations in ObligationForest, as well as moves some cold path code to an uninlined function.
This commit is contained in:
commit
f90e617305
3 changed files with 329 additions and 356 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::infer::{InferCtxt, TyOrConstInferVar};
|
||||
use rustc_data_structures::obligation_forest::ProcessResult;
|
||||
use rustc_data_structures::obligation_forest::{DoCompleted, Error, ForestObligation};
|
||||
use rustc_data_structures::obligation_forest::{Error, ForestObligation, Outcome};
|
||||
use rustc_data_structures::obligation_forest::{ObligationForest, ObligationProcessor};
|
||||
use rustc_errors::ErrorReported;
|
||||
use rustc_infer::traits::{TraitEngine, TraitEngineExt as _, TraitObligation};
|
||||
|
@ -129,13 +129,11 @@ impl<'a, 'tcx> FulfillmentContext<'tcx> {
|
|||
debug!("select: starting another iteration");
|
||||
|
||||
// Process pending obligations.
|
||||
let outcome = self.predicates.process_obligations(
|
||||
&mut FulfillProcessor {
|
||||
let outcome: Outcome<_, _> =
|
||||
self.predicates.process_obligations(&mut FulfillProcessor {
|
||||
selcx,
|
||||
register_region_obligations: self.register_region_obligations,
|
||||
},
|
||||
DoCompleted::No,
|
||||
);
|
||||
});
|
||||
debug!("select: outcome={:#?}", outcome);
|
||||
|
||||
// FIXME: if we kept the original cache key, we could mark projection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue