diff options
Diffstat (limited to 'crates/ra_db/src/lib.rs')
-rw-r--r-- | crates/ra_db/src/lib.rs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index 3c41ee56d..732899718 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs | |||
@@ -18,23 +18,9 @@ pub use crate::{ | |||
18 | FileTextQuery, FileSourceRootQuery, SourceRootQuery, LocalRootsQuery, LibraryRootsQuery, CrateGraphQuery, | 18 | FileTextQuery, FileSourceRootQuery, SourceRootQuery, LocalRootsQuery, LibraryRootsQuery, CrateGraphQuery, |
19 | FileRelativePathQuery | 19 | FileRelativePathQuery |
20 | }, | 20 | }, |
21 | loc2id::{LocationIntener, NumericId}, | 21 | loc2id::LocationIntener, |
22 | }; | 22 | }; |
23 | 23 | ||
24 | #[macro_export] | ||
25 | macro_rules! impl_numeric_id { | ||
26 | ($id:ident) => { | ||
27 | impl $crate::NumericId for $id { | ||
28 | fn from_u32(id: u32) -> Self { | ||
29 | $id(id) | ||
30 | } | ||
31 | fn to_u32(self) -> u32 { | ||
32 | self.0 | ||
33 | } | ||
34 | } | ||
35 | }; | ||
36 | } | ||
37 | |||
38 | pub trait BaseDatabase: salsa::Database { | 24 | pub trait BaseDatabase: salsa::Database { |
39 | fn check_canceled(&self) -> Cancelable<()> { | 25 | fn check_canceled(&self) -> Cancelable<()> { |
40 | if self.salsa_runtime().is_current_revision_canceled() { | 26 | if self.salsa_runtime().is_current_revision_canceled() { |