diff options
| author | kadmin <julianknodt@gmail.com> | 2022-01-08 09:28:12 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2022-01-17 17:44:56 +0000 |
| commit | 67f56671d0384bdb2d92dddebfbf42510b16e0f7 (patch) | |
| tree | 40e044743da8fab20f86e317f65f1276e78343c5 /compiler/rustc_infer/src/infer/projection.rs | |
| parent | fb57b7518d207caa99bdd99f4dab2a7d3902a83a (diff) | |
| download | rust-67f56671d0384bdb2d92dddebfbf42510b16e0f7.tar.gz rust-67f56671d0384bdb2d92dddebfbf42510b16e0f7.zip | |
Use Term in ProjectionPredicate
ProjectionPredicate should be able to handle both associated types and consts so this adds the first step of that. It mainly just pipes types all the way down, not entirely sure how to handle consts, but hopefully that'll come with time.
Diffstat (limited to 'compiler/rustc_infer/src/infer/projection.rs')
| -rw-r--r-- | compiler/rustc_infer/src/infer/projection.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_infer/src/infer/projection.rs b/compiler/rustc_infer/src/infer/projection.rs index 9b53ab72b00..b45a6514d79 100644 --- a/compiler/rustc_infer/src/infer/projection.rs +++ b/compiler/rustc_infer/src/infer/projection.rs @@ -26,7 +26,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { kind: TypeVariableOriginKind::NormalizeProjectionType, span: self.tcx.def_span(def_id), }); - let projection = ty::Binder::dummy(ty::ProjectionPredicate { projection_ty, ty: ty_var }); + let projection = + ty::Binder::dummy(ty::ProjectionPredicate { projection_ty, term: ty_var.into() }); let obligation = Obligation::with_depth( cause, recursion_depth, |
