aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/ty/method_resolution.rs1
-rw-r--r--crates/ra_hir/src/ty/traits/chalk.rs17
2 files changed, 13 insertions, 5 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs
index bc5033be6..607e9ba79 100644
--- a/crates/ra_hir/src/ty/method_resolution.rs
+++ b/crates/ra_hir/src/ty/method_resolution.rs
@@ -202,7 +202,6 @@ fn iterate_trait_method_candidates<T>(
202 } 202 }
203 } 203 }
204 known_implemented = true; 204 known_implemented = true;
205 // TODO the self type is now canonicalized...
206 if let Some(result) = callback(&ty.value, m) { 205 if let Some(result) = callback(&ty.value, m) {
207 return Some(result); 206 return Some(result);
208 } 207 }
diff --git a/crates/ra_hir/src/ty/traits/chalk.rs b/crates/ra_hir/src/ty/traits/chalk.rs
index 1adc1d601..c77db9202 100644
--- a/crates/ra_hir/src/ty/traits/chalk.rs
+++ b/crates/ra_hir/src/ty/traits/chalk.rs
@@ -40,9 +40,7 @@ impl ToChalk for Ty {
40 Ty::Infer(_infer_ty) => panic!("uncanonicalized infer ty"), 40 Ty::Infer(_infer_ty) => panic!("uncanonicalized infer ty"),
41 // FIXME this is clearly incorrect, but probably not too incorrect 41 // FIXME this is clearly incorrect, but probably not too incorrect
42 // and I'm not sure what to actually do with Ty::Unknown 42 // and I'm not sure what to actually do with Ty::Unknown
43 Ty::Unknown => { 43 Ty::Unknown => PlaceholderIndex { ui: UniverseIndex::ROOT, idx: 0 }.to_ty(),
44 PlaceholderIndex { ui: UniverseIndex::ROOT, idx: 0 }.to_ty()
45 },
46 } 44 }
47 } 45 }
48 fn from_chalk(db: &impl HirDatabase, chalk: chalk_ir::Ty) -> Self { 46 fn from_chalk(db: &impl HirDatabase, chalk: chalk_ir::Ty) -> Self {
@@ -189,7 +187,9 @@ where
189 fundamental: false, 187 fundamental: false,
190 }; 188 };
191 let where_clauses = Vec::new(); // FIXME add where clauses 189 let where_clauses = Vec::new(); // FIXME add where clauses
192 let trait_datum_bound = chalk_rust_ir::TraitDatumBound { trait_ref, where_clauses, flags }; 190 let associated_ty_ids = Vec::new(); // FIXME add associated tys
191 let trait_datum_bound =
192 chalk_rust_ir::TraitDatumBound { trait_ref, where_clauses, flags, associated_ty_ids };
193 let trait_datum = TraitDatum { binders: make_binders(trait_datum_bound, bound_vars.len()) }; 193 let trait_datum = TraitDatum { binders: make_binders(trait_datum_bound, bound_vars.len()) };
194 Arc::new(trait_datum) 194 Arc::new(trait_datum)
195 } 195 }
@@ -289,6 +289,15 @@ where
289 debug!("split_projection {:?}", projection); 289 debug!("split_projection {:?}", projection);
290 unimplemented!() 290 unimplemented!()
291 } 291 }
292 fn custom_clauses(&self) -> Vec<chalk_ir::ProgramClause> {
293 debug!("custom_clauses");
294 vec![]
295 }
296 fn all_structs(&self) -> Vec<chalk_ir::StructId> {
297 debug!("all_structs");
298 // FIXME
299 vec![]
300 }
292} 301}
293 302
294fn id_from_chalk<T: InternKey>(chalk_id: chalk_ir::RawId) -> T { 303fn id_from_chalk<T: InternKey>(chalk_id: chalk_ir::RawId) -> T {