From f11237561c391eecba39c5ba57defa2dc7a27b21 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 14:02:08 +0300 Subject: Cleanup imports --- crates/ra_hir/src/ids.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'crates/ra_hir/src/ids.rs') diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index 2b59365fb..145837f7f 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs @@ -7,12 +7,6 @@ use ra_db::salsa; -pub use hir_def::{ - AstItemDef, ConstId, EnumId, FunctionId, ItemLoc, LocationCtx, StaticId, StructId, TraitId, - TypeAliasId, -}; -pub use hir_expand::{HirFileId, MacroCallId, MacroCallLoc, MacroDefId, MacroFile, MacroFileKind}; - macro_rules! impl_intern_key { ($name:ident) => { impl salsa::InternKey for $name { -- cgit v1.2.3 From 53506a755220557a558be4da244b70d79f5b0fa9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 14:13:51 +0300 Subject: Pull macro up --- crates/ra_hir/src/ids.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'crates/ra_hir/src/ids.rs') diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index 145837f7f..67de8b243 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs @@ -5,20 +5,7 @@ //! This module defines a bunch of ids we are using. The most important ones are //! probably `HirFileId` and `DefId`. -use ra_db::salsa; - -macro_rules! impl_intern_key { - ($name:ident) => { - impl salsa::InternKey for $name { - fn from_intern_id(v: salsa::InternId) -> Self { - $name(v) - } - fn as_intern_id(&self) -> salsa::InternId { - self.0 - } - } - }; -} +use ra_db::{impl_intern_key, salsa}; /// This exists just for Chalk, because Chalk just has a single `StructId` where /// we have different kinds of ADTs, primitive types and special type -- cgit v1.2.3 From 9c766db5ff9dad3ca13539c186f40f657380a831 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 14:25:48 +0300 Subject: Remove ids module --- crates/ra_hir/src/ids.rs | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 crates/ra_hir/src/ids.rs (limited to 'crates/ra_hir/src/ids.rs') diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs deleted file mode 100644 index 67de8b243..000000000 --- a/crates/ra_hir/src/ids.rs +++ /dev/null @@ -1,26 +0,0 @@ -//! hir makes heavy use of ids: integer (u32) handlers to various things. You -//! can think of id as a pointer (but without a lifetime) or a file descriptor -//! (but for hir objects). -//! -//! This module defines a bunch of ids we are using. The most important ones are -//! probably `HirFileId` and `DefId`. - -use ra_db::{impl_intern_key, salsa}; - -/// This exists just for Chalk, because Chalk just has a single `StructId` where -/// we have different kinds of ADTs, primitive types and special type -/// constructors like tuples and function pointers. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct TypeCtorId(salsa::InternId); -impl_intern_key!(TypeCtorId); - -/// This exists just for Chalk, because our ImplIds are only unique per module. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct GlobalImplId(salsa::InternId); -impl_intern_key!(GlobalImplId); - -/// This exists just for Chalk, because it needs a unique ID for each associated -/// type value in an impl (even synthetic ones). -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct AssocTyValueId(salsa::InternId); -impl_intern_key!(AssocTyValueId); -- cgit v1.2.3