aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-27 09:34:54 +0000
committerGitHub <[email protected]>2019-11-27 09:34:54 +0000
commit84bd7916ffa91081e8938d15c673142498442042 (patch)
tree24e9543a78e13477a85c38f98a58f402d7a40ef9 /crates/ra_hir_def
parent57ad4542b6c7fdfeb3b6abc4cd1a4243495694df (diff)
parent825049bc6247f6d596910cd99f76f891d5435a86 (diff)
Merge #2426
2426: Decouple r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs
index 274dd1467..ea3f00bb3 100644
--- a/crates/ra_hir_def/src/lib.rs
+++ b/crates/ra_hir_def/src/lib.rs
@@ -398,6 +398,16 @@ impl_froms!(
398 ConstId 398 ConstId
399); 399);
400 400
401impl From<AssocItemId> for GenericDefId {
402 fn from(item: AssocItemId) -> Self {
403 match item {
404 AssocItemId::FunctionId(f) => f.into(),
405 AssocItemId::ConstId(c) => c.into(),
406 AssocItemId::TypeAliasId(t) => t.into(),
407 }
408 }
409}
410
401#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] 411#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
402pub enum AttrDefId { 412pub enum AttrDefId {
403 ModuleId(ModuleId), 413 ModuleId(ModuleId),