aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def')
-rw-r--r--crates/hir_def/src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/hir_def/src/lib.rs b/crates/hir_def/src/lib.rs
index e2af0e514..eefc75706 100644
--- a/crates/hir_def/src/lib.rs
+++ b/crates/hir_def/src/lib.rs
@@ -435,6 +435,16 @@ impl_from!(
435 for AttrDefId 435 for AttrDefId
436); 436);
437 437
438impl From<AssocContainerId> for AttrDefId {
439 fn from(acid: AssocContainerId) -> Self {
440 match acid {
441 AssocContainerId::ModuleId(mid) => AttrDefId::ModuleId(mid),
442 AssocContainerId::ImplId(iid) => AttrDefId::ImplId(iid),
443 AssocContainerId::TraitId(tid) => AttrDefId::TraitId(tid),
444 }
445 }
446}
447
438#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 448#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
439pub enum VariantId { 449pub enum VariantId {
440 EnumVariantId(EnumVariantId), 450 EnumVariantId(EnumVariantId),