From b21829f7edd71fb14911fc6ba47fe715757e415f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 15 Nov 2019 21:28:00 +0300 Subject: Remove old impls infrastructure --- crates/ra_hir_def/src/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'crates/ra_hir_def/src/lib.rs') diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index 22650db8b..0a59c4ad7 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs @@ -13,6 +13,7 @@ pub mod path; pub mod type_ref; pub mod builtin_type; pub mod adt; +pub mod imp; pub mod diagnostics; pub mod expr; pub mod body; @@ -396,3 +397,15 @@ pub enum DefWithBodyId { } impl_froms!(DefWithBodyId: FunctionId, ConstId, StaticId); + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum AssocItemId { + FunctionId(FunctionId), + ConstId(ConstId), + TypeAliasId(TypeAliasId), +} +// FIXME: not every function, ... is actually an assoc item. maybe we should make +// sure that you can only turn actual assoc items into AssocItemIds. This would +// require not implementing From, and instead having some checked way of +// casting them, and somehow making the constructors private, which would be annoying. +impl_froms!(AssocItemId: FunctionId, ConstId, TypeAliasId); -- cgit v1.2.3