aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-20 11:07:23 +0000
committerAleksey Kladov <[email protected]>2019-12-20 11:07:23 +0000
commit94ad07af4bef6a70602e315bf315c6fce95618dd (patch)
tree2e3ab7e72f26a2dd1024479d5146fb8f7d2c2c73 /crates/ra_hir_ty
parent8fc20b65035d93bcc1b3a89127916bd165a8d938 (diff)
Introduce `ContainerId`
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/infer/path.rs2
-rw-r--r--crates/ra_hir_ty/src/method_resolution.rs2
-rw-r--r--crates/ra_hir_ty/src/utils.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/infer/path.rs b/crates/ra_hir_ty/src/infer/path.rs
index a96ab75d1..ffd358367 100644
--- a/crates/ra_hir_ty/src/infer/path.rs
+++ b/crates/ra_hir_ty/src/infer/path.rs
@@ -237,7 +237,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
237 })); 237 }));
238 Some(substs) 238 Some(substs)
239 } 239 }
240 AssocContainerId::ModuleId(_) | AssocContainerId::DefWithBodyId(_) => None, 240 AssocContainerId::ContainerId(_) => None,
241 }; 241 };
242 242
243 self.write_assoc_resolution(id, item.into()); 243 self.write_assoc_resolution(id, item.into());
diff --git a/crates/ra_hir_ty/src/method_resolution.rs b/crates/ra_hir_ty/src/method_resolution.rs
index 1c2e7b934..1b2f4014c 100644
--- a/crates/ra_hir_ty/src/method_resolution.rs
+++ b/crates/ra_hir_ty/src/method_resolution.rs
@@ -456,7 +456,7 @@ fn transform_receiver_ty(
456 .fill_with_unknown() 456 .fill_with_unknown()
457 .build(), 457 .build(),
458 AssocContainerId::ImplId(impl_id) => inherent_impl_substs(db, impl_id, &self_ty)?, 458 AssocContainerId::ImplId(impl_id) => inherent_impl_substs(db, impl_id, &self_ty)?,
459 AssocContainerId::ModuleId(_) | AssocContainerId::DefWithBodyId(_) => unreachable!(), 459 AssocContainerId::ContainerId(_) => unreachable!(),
460 }; 460 };
461 let sig = db.callable_item_signature(function_id.into()); 461 let sig = db.callable_item_signature(function_id.into());
462 Some(sig.params()[0].clone().subst(&substs)) 462 Some(sig.params()[0].clone().subst(&substs))
diff --git a/crates/ra_hir_ty/src/utils.rs b/crates/ra_hir_ty/src/utils.rs
index 8b5b611ec..0b1806a84 100644
--- a/crates/ra_hir_ty/src/utils.rs
+++ b/crates/ra_hir_ty/src/utils.rs
@@ -157,6 +157,6 @@ fn parent_generic_def(db: &impl DefDatabase, def: GenericDefId) -> Option<Generi
157 match container { 157 match container {
158 AssocContainerId::ImplId(it) => Some(it.into()), 158 AssocContainerId::ImplId(it) => Some(it.into()),
159 AssocContainerId::TraitId(it) => Some(it.into()), 159 AssocContainerId::TraitId(it) => Some(it.into()),
160 AssocContainerId::ModuleId(_) | AssocContainerId::DefWithBodyId(_) => None, 160 AssocContainerId::ContainerId(_) => None,
161 } 161 }
162} 162}