1
Fork 0

Move some solver stuff to middle

This commit is contained in:
Michael Goulet 2023-02-15 02:08:05 +00:00
parent ff4b772f80
commit 67698aa6ad
10 changed files with 118 additions and 103 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>>;