aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/traits
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/traits')
-rw-r--r--crates/ra_hir/src/ty/traits/chalk.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs
index e39e8aaca..81a378bac 100644
--- a/crates/ra_hir/src/ty/traits/chalk.rs
+++ b/crates/ra_hir/src/ty/traits/chalk.rs
@@ -68,8 +68,15 @@ impl ToChalk for Ty {
68 } 68 }
69 Ty::Bound(idx) => chalk_ir::TyData::BoundVar(idx as usize).intern(), 69 Ty::Bound(idx) => chalk_ir::TyData::BoundVar(idx as usize).intern(),
70 Ty::Infer(_infer_ty) => panic!("uncanonicalized infer ty"), 70 Ty::Infer(_infer_ty) => panic!("uncanonicalized infer ty"),
71 // FIXME use Chalk's Dyn/Opaque once the bugs with that are fixed 71 Ty::Dyn(predicates) => {
72 Ty::Unknown | Ty::Dyn(_) | Ty::Opaque(_) => { 72 let where_clauses = predicates.iter().cloned().map(|p| p.to_chalk(db)).collect();
73 chalk_ir::TyData::Dyn(make_binders(where_clauses, 1)).intern()
74 }
75 Ty::Opaque(predicates) => {
76 let where_clauses = predicates.iter().cloned().map(|p| p.to_chalk(db)).collect();
77 chalk_ir::TyData::Opaque(make_binders(where_clauses, 1)).intern()
78 }
79 Ty::Unknown => {
73 let parameters = Vec::new(); 80 let parameters = Vec::new();
74 let name = TypeName::Error; 81 let name = TypeName::Error;
75 chalk_ir::ApplicationTy { name, parameters }.cast().intern() 82 chalk_ir::ApplicationTy { name, parameters }.cast().intern()