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.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs
index 36cc52704..18f301789 100644
--- a/crates/ra_hir/src/ty/traits/chalk.rs
+++ b/crates/ra_hir/src/ty/traits/chalk.rs
@@ -32,8 +32,7 @@ impl ToChalk for Ty {
32 match self { 32 match self {
33 Ty::Apply(apply_ty) => chalk_ir::Ty::Apply(apply_ty.to_chalk(db)), 33 Ty::Apply(apply_ty) => chalk_ir::Ty::Apply(apply_ty.to_chalk(db)),
34 Ty::Param { idx, .. } => { 34 Ty::Param { idx, .. } => {
35 PlaceholderIndex { ui: UniverseIndex::ROOT, idx: idx as usize } 35 PlaceholderIndex { ui: UniverseIndex::ROOT, idx: idx as usize }.to_ty()
36 .to_ty()
37 } 36 }
38 Ty::Bound(idx) => chalk_ir::Ty::BoundVar(idx as usize), 37 Ty::Bound(idx) => chalk_ir::Ty::BoundVar(idx as usize),
39 Ty::Infer(_infer_ty) => panic!("uncanonicalized infer ty"), 38 Ty::Infer(_infer_ty) => panic!("uncanonicalized infer ty"),
@@ -74,9 +73,7 @@ impl ToChalk for ApplicationTy {
74 73
75 fn from_chalk(db: &impl HirDatabase, apply_ty: chalk_ir::ApplicationTy) -> ApplicationTy { 74 fn from_chalk(db: &impl HirDatabase, apply_ty: chalk_ir::ApplicationTy) -> ApplicationTy {
76 let ctor = match apply_ty.name { 75 let ctor = match apply_ty.name {
77 TypeName::TypeKindId(TypeKindId::StructId(struct_id)) => { 76 TypeName::TypeKindId(TypeKindId::StructId(struct_id)) => from_chalk(db, struct_id),
78 from_chalk(db, struct_id)
79 }
80 TypeName::TypeKindId(_) => unimplemented!(), 77 TypeName::TypeKindId(_) => unimplemented!(),
81 TypeName::Placeholder(_) => unimplemented!(), 78 TypeName::Placeholder(_) => unimplemented!(),
82 TypeName::AssociatedType(_) => unimplemented!(), 79 TypeName::AssociatedType(_) => unimplemented!(),
@@ -267,7 +264,11 @@ where
267 .map(|impl_block| impl_block.to_chalk(self.db)) 264 .map(|impl_block| impl_block.to_chalk(self.db))
268 .collect() 265 .collect()
269 } 266 }
270 fn impl_provided_for(&self, auto_trait_id: chalk_ir::TraitId, struct_id: chalk_ir::StructId) -> bool { 267 fn impl_provided_for(
268 &self,
269 auto_trait_id: chalk_ir::TraitId,
270 struct_id: chalk_ir::StructId,
271 ) -> bool {
271 eprintln!("impl_provided_for {:?}, {:?}", auto_trait_id, struct_id); 272 eprintln!("impl_provided_for {:?}, {:?}", auto_trait_id, struct_id);
272 false // FIXME 273 false // FIXME
273 } 274 }