1
Fork 0

Rollup merge of #108071 - compiler-errors:new-solver-caching, r=lcnr

Implement goal caching with the new solver

Maybe it's wrong, idk. Opening mostly for first impressions before I go to sleep.

r? ``@lcnr,`` cc ``@cjgillot``
This commit is contained in:
Matthias Krüger 2023-03-11 15:43:13 +01:00 committed by GitHub
commit 244ec84a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 191 additions and 181 deletions

View file

@ -53,6 +53,12 @@ pub struct Obligation<'tcx, T> {
pub recursion_depth: usize,
}
impl<'tcx, P> From<Obligation<'tcx, P>> for solve::Goal<'tcx, P> {
fn from(value: Obligation<'tcx, P>) -> Self {
solve::Goal { param_env: value.param_env, predicate: value.predicate }
}
}
pub type PredicateObligation<'tcx> = Obligation<'tcx, ty::Predicate<'tcx>>;
pub type TraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitPredicate<'tcx>>;