diff options
| author | Michael Goulet <michael@errs.io> | 2023-02-15 02:08:05 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-10 23:46:38 +0000 |
| commit | 67698aa6adafadfc36667cdb06ac8bfcffe71f90 (patch) | |
| tree | 85b274565d77583425a30b99b38dfbebb8a2dbec /compiler/rustc_infer/src/traits/mod.rs | |
| parent | ff4b772f805ec1e1c1bd7e189ab8d5a4e3a6ef13 (diff) | |
| download | rust-67698aa6adafadfc36667cdb06ac8bfcffe71f90.tar.gz rust-67698aa6adafadfc36667cdb06ac8bfcffe71f90.zip | |
Move some solver stuff to middle
Diffstat (limited to 'compiler/rustc_infer/src/traits/mod.rs')
| -rw-r--r-- | compiler/rustc_infer/src/traits/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/traits/mod.rs b/compiler/rustc_infer/src/traits/mod.rs index 3a82899660b..77c67c14ecc 100644 --- a/compiler/rustc_infer/src/traits/mod.rs +++ b/compiler/rustc_infer/src/traits/mod.rs @@ -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>>; |
