From bc905d202c613a831f7c1abb846b612900a9b43a Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 22 Sep 2019 20:08:46 +0200 Subject: Handle projection types from Chalk --- crates/ra_hir/src/ty/traits/chalk.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs index 693d9b28f..cfecf75ee 100644 --- a/crates/ra_hir/src/ty/traits/chalk.rs +++ b/crates/ra_hir/src/ty/traits/chalk.rs @@ -104,7 +104,11 @@ impl ToChalk for Ty { } } } - chalk_ir::Ty::Projection(_) => unimplemented!(), + chalk_ir::Ty::Projection(proj) => { + let associated_ty = from_chalk(db, proj.associated_ty_id); + let parameters = from_chalk(db, proj.parameters); + Ty::Projection(ProjectionTy { associated_ty, parameters }) + } chalk_ir::Ty::ForAll(_) => unimplemented!(), chalk_ir::Ty::BoundVar(idx) => Ty::Bound(idx as u32), chalk_ir::Ty::InferenceVar(_iv) => panic!("unexpected chalk infer ty"), -- cgit v1.2.3